Invisble Tool
Invisble Tool
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)