0% found this document useful (0 votes)
32 views2 pages

Invisble Tool

This document contains code for a script that allows players in Roblox to become invisible by attaching a "ghost handle" to their character and offsetting their camera. The script creates a tool called "Ghostify" that can be toggled on and off. When enabled, it spawns a transparent handle part, attaches it to the player's character, offsets their camera and position, and allows them to equip tools while invisible by parenting them to the backpack and adjusting their grips.

Uploaded by

paqpa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views2 pages

Invisble Tool

This document contains code for a script that allows players in Roblox to become invisible by attaching a "ghost handle" to their character and offsetting their camera. The script creates a tool called "Ghostify" that can be toggled on and off. When enabled, it spawns a transparent handle part, attaches it to the player's character, offsets their camera and position, and allows them to equip tools while invisible by parenting them to the backpack and adjusting their grips.

Uploaded by

paqpa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

-- // https://t.

me/arceusxscripts \\ --
local offset = 1100 --how far you are away from your camera when invisible
local LocalPlayer = game.Players.LocalPlayer
local Backpack = LocalPlayer.Backpack
local Character = LocalPlayer.Character
local invisible = false
local grips = {}
local heldTool
local gripChanged
local handle
local weld
function setDisplayDistance(distance)
for _,player in pairs(game.Players:GetPlayers()) do if player.Character and
player.Character:FindFirstChildWhichIsA("Humanoid") then
player.Character:FindFirstChildWhichIsA("Humanoid").NameDisplayDistance = distance
player.Character:FindFirstChildWhichIsA("Humanoid").HealthDisplayDistance =
distance end end
end
local tool = Instance.new("Tool", Backpack)
tool.Name = "Ghostify [Disabled]"
tool.RequiresHandle = false
tool.CanBeDropped = false
tool.Equipped:Connect(function() wait()
if not invisible then
invisible = true
tool.Name = "Ghostify [Enabled]"
if handle then handle:Destroy() end if weld then weld:Destroy() end
handle = Instance.new("Part", workspace) handle.Name = "Handle"
handle.Transparency = 1 handle.CanCollide = false handle.Size = Vector3.new(2, 1,
1)
weld = Instance.new("Weld", handle) weld.Part0 = handle weld.Part1 =
Character.HumanoidRootPart weld.C0 = CFrame.new(0, offset-1.5, 0)
setDisplayDistance(offset+100)
workspace.CurrentCamera.CameraSubject = handle
Character.HumanoidRootPart.CFrame = Character.HumanoidRootPart.CFrame *
CFrame.new(0, offset, 0)
Character.Humanoid.HipHeight = offset
Character.Humanoid:ChangeState(11)
for _,child in pairs(Backpack:GetChildren()) do if child:IsA("Tool") and
child ~= tool then grips[child] = child.Grip end end
elseif invisible then
invisible = false
tool.Name = "Ghostify [Disabled]"
if handle then handle:Destroy() end if weld then weld:Destroy() end
for _,child in pairs(Character:GetChildren()) do if child:IsA("Tool") then
child.Parent = Backpack end end
for tool,grip in pairs(grips) do if tool then tool.Grip = grip end end
heldTool = nil
setDisplayDistance(100)
workspace.CurrentCamera.CameraSubject = Character.Humanoid
Character.Animate.Disabled = false
Character.HumanoidRootPart.CFrame = Character.HumanoidRootPart.CFrame *
CFrame.new(0, -offset, 0)
Character.Humanoid.HipHeight = 0
Character.Humanoid:ChangeState(11)
end
tool.Parent = Backpack
end)
Character.ChildAdded:Connect(function(child) wait()
if invisible and child:IsA("Tool") and child ~= heldTool and child ~= tool then
heldTool = child
local lastGrip = heldTool.Grip
if not grips[heldTool] then grips[heldTool] = lastGrip end
for _,track in pairs(Character.Humanoid:GetPlayingAnimationTracks()) do
track:Stop() end
Character.Animate.Disabled = true
heldTool.Grip = heldTool.Grip*(CFrame.new(0, offset-1.5, 1.5) *
CFrame.Angles(math.rad(-90), 0, 0))
heldTool.Parent = Backpack
heldTool.Parent = Character
if gripChanged then gripChanged:Disconnect() end
gripChanged = heldTool:GetPropertyChangedSignal("Grip"):Connect(function()
wait()
if not invisible then gripChanged:Disconnect() end
if heldTool.Grip ~= lastGrip then
lastGrip = heldTool.Grip*(CFrame.new(0, offset-1.5, 1.5) *
CFrame.Angles(math.rad(-90), 0, 0))
heldTool.Grip = lastGrip
heldTool.Parent = Backpack
heldTool.Parent = Character
end
end)
end
end)

You might also like