Advertisement
Justin1736472

Untitled

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