LynXS_

Untitled

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