Advertisement
Guest User

Invisible

a guest
Aug 7th, 2022
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.53 KB | None | 0 0
  1. --[[Invisibility Toggle
  2.  
  3. You can find the orginal concept here: https://v3rmillion.net/showthread.php?tid=544634
  4.  
  5. This method clones the character locally, teleports the real character to a safe location, then sets the character to the clone.
  6. Basically, your real character is in the sky while you are on the ground.
  7.  
  8.  
  9. Because of the way this works, games with a decent anti-cheat will this up.
  10. If you turn it off, you have to go to a safe place before going invisible.
  11.  
  12. Written by: BitingTheDust ; https://v3rmillion.net/member.php?action=profile&uid=1628149
  13. ]]
  14. --Settings:
  15. local ScriptStarted = false
  16. local Keybind = "E" --Set to whatever you want, has to be the name of a KeyCode Enum.
  17. local Transparency = true --Will make you slightly transparent when you are invisible. No reason to disable.
  18. local NoClip = false --Will make your fake character no clip.
  19.  
  20. local Player = game:GetService("Players").LocalPlayer
  21. local RealCharacter = Player.Character or Player.CharacterAdded:Wait()
  22.  
  23. local IsInvisible = false
  24.  
  25. RealCharacter.Archivable = true
  26. local FakeCharacter = RealCharacter:Clone()
  27. local Part
  28. Part = Instance.new("Part", workspace)
  29. Part.Anchored = true
  30. Part.Size = Vector3.new(200, 1, 200)
  31. Part.CFrame = CFrame.new(0, -500, 0) --Set this to whatever you want, just far away from the map.
  32. Part.CanCollide = true
  33. FakeCharacter.Parent = workspace
  34. FakeCharacter.HumanoidRootPart.CFrame = Part.CFrame * CFrame.new(0, 5, 0)
  35.  
  36. for i, v in pairs(RealCharacter:GetChildren()) do
  37. if v:IsA("LocalScript") then
  38. local clone = v:Clone()
  39. clone.Disabled = true
  40. clone.Parent = FakeCharacter
  41. end
  42. end
  43. if Transparency then
  44. for i, v in pairs(FakeCharacter:GetDescendants()) do
  45. if v:IsA("BasePart") then
  46. v.Transparency = 0.7
  47. end
  48. end
  49. end
  50. local CanInvis = true
  51. function RealCharacterDied()
  52. CanInvis = false
  53. RealCharacter:Destroy()
  54. RealCharacter = Player.Character
  55. CanInvis = true
  56. isinvisible = false
  57. FakeCharacter:Destroy()
  58. workspace.CurrentCamera.CameraSubject = RealCharacter.Humanoid
  59.  
  60. RealCharacter.Archivable = true
  61. FakeCharacter = RealCharacter:Clone()
  62. Part:Destroy()
  63. Part = Instance.new("Part", workspace)
  64. Part.Anchored = true
  65. Part.Size = Vector3.new(200, 1, 200)
  66. Part.CFrame = CFrame.new(9999, 9999, 9999) --Set this to whatever you want, just far away from the map.
  67. Part.CanCollide = true
  68. FakeCharacter.Parent = workspace
  69. FakeCharacter.HumanoidRootPart.CFrame = Part.CFrame * CFrame.new(0, 5, 0)
  70.  
  71. for i, v in pairs(RealCharacter:GetChildren()) do
  72. if v:IsA("LocalScript") then
  73. local clone = v:Clone()
  74. clone.Disabled = true
  75. clone.Parent = FakeCharacter
  76. end
  77. end
  78. if Transparency then
  79. for i, v in pairs(FakeCharacter:GetDescendants()) do
  80. if v:IsA("BasePart") then
  81. v.Transparency = 0.7
  82. end
  83. end
  84. end
  85. RealCharacter.Humanoid.Died:Connect(function()
  86. RealCharacter:Destroy()
  87. FakeCharacter:Destroy()
  88. end)
  89. Player.CharacterAppearanceLoaded:Connect(RealCharacterDied)
  90. end
  91. RealCharacter.Humanoid.Died:Connect(function()
  92. RealCharacter:Destroy()
  93. FakeCharacter:Destroy()
  94. end)
  95. Player.CharacterAppearanceLoaded:Connect(RealCharacterDied)
  96. local PseudoAnchor
  97. game:GetService "RunService".RenderStepped:Connect(
  98. function()
  99. if PseudoAnchor ~= nil then
  100. PseudoAnchor.CFrame = Part.CFrame * CFrame.new(0, 5, 0)
  101. end
  102. if NoClip then
  103. FakeCharacter.Humanoid:ChangeState(11)
  104. end
  105. end
  106. )
  107.  
  108. PseudoAnchor = FakeCharacter.HumanoidRootPart
  109. local function Invisible()
  110. if IsInvisible == false then
  111. local StoredCF = RealCharacter.HumanoidRootPart.CFrame
  112. RealCharacter.HumanoidRootPart.CFrame = FakeCharacter.HumanoidRootPart.CFrame
  113. FakeCharacter.HumanoidRootPart.CFrame = StoredCF
  114. RealCharacter.Humanoid:UnequipTools()
  115. Player.Character = FakeCharacter
  116. workspace.CurrentCamera.CameraSubject = FakeCharacter.Humanoid
  117. PseudoAnchor = RealCharacter.HumanoidRootPart
  118. for i, v in pairs(FakeCharacter:GetChildren()) do
  119. if v:IsA("LocalScript") then
  120. v.Disabled = false
  121. end
  122. end
  123.  
  124. IsInvisible = true
  125. else
  126. local StoredCF = FakeCharacter.HumanoidRootPart.CFrame
  127. FakeCharacter.HumanoidRootPart.CFrame = RealCharacter.HumanoidRootPart.CFrame
  128.  
  129. RealCharacter.HumanoidRootPart.CFrame = StoredCF
  130.  
  131. FakeCharacter.Humanoid:UnequipTools()
  132. Player.Character = RealCharacter
  133. workspace.CurrentCamera.CameraSubject = RealCharacter.Humanoid
  134. PseudoAnchor = FakeCharacter.HumanoidRootPart
  135. for i, v in pairs(FakeCharacter:GetChildren()) do
  136. if v:IsA("LocalScript") then
  137. v.Disabled = true
  138. end
  139. end
  140. IsInvisible = false
  141. end
  142. end
  143.  
  144. game:GetService("UserInputService").InputBegan:Connect(
  145. function(key, gamep)
  146. if gamep then
  147. return
  148. end
  149. if key.KeyCode.Name:lower() == Keybind:lower() and CanInvis and RealCharacter and FakeCharacter then
  150. if RealCharacter:FindFirstChild("HumanoidRootPart") and FakeCharacter:FindFirstChild("HumanoidRootPart") then
  151. Invisible()
  152. end
  153. end
  154. end
  155. )
  156. local Sound = Instance.new("Sound",game:GetService("SoundService"))
  157. Sound.SoundId = "rbxassetid://232127604"
  158. Sound:Play()
  159. game:GetService("StarterGui"):SetCore("SendNotification",{["Title"] = "Invisible Toggle Loaded",["Text"] = "Press "..Keybind.." to become change visibility.",["Duration"] = 20,["Button1"] = "Okay."})
  160.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement