Advertisement
exploit43262

invis script

Jul 23rd, 2022 (edited)
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.04 KB | None | 0 0
  1. --[[Invisibility Toggle
  2.  
  3. --made by Trigzzy#8305
  4. [
  5. --Settings:
  6. local ScriptStarted = false
  7. local Keybind = "E" --Set to whatever you want, has to be the name of a KeyCode Enum.
  8. local Transparency = true --Will make you slightly transparent when you are invisible. No reason to disable.
  9. local NoClip = false --Will make your fake character no clip.
  10.  
  11. local Player = game:GetService("Players").LocalPlayer
  12. local RealCharacter = Player.Character or Player.CharacterAdded:Wait()
  13.  
  14. local IsInvisible = false
  15.  
  16. RealCharacter.Archivable = true
  17. local FakeCharacter = RealCharacter:Clone()
  18. local Part
  19. Part = Instance.new("Part", workspace)
  20. Part.Anchored = true
  21. Part.Size = Vector3.new(200, 1, 200)
  22. Part.CFrame = CFrame.new(0, -500, 0) --Set this to whatever you want, just far away from the map.
  23. Part.CanCollide = true
  24. FakeCharacter.Parent = workspace
  25. FakeCharacter.HumanoidRootPart.CFrame = Part.CFrame * CFrame.new(0, 5, 0)
  26.  
  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.  
  51. RealCharacter.Archivable = true
  52. FakeCharacter = RealCharacter:Clone()
  53. Part:Destroy()
  54. Part = Instance.new("Part", workspace)
  55. Part.Anchored = true
  56. Part.Size = Vector3.new(200, 1, 200)
  57. Part.CFrame = CFrame.new(9999, 9999, 9999) --Set this to whatever you want, just far away from the map.
  58. Part.CanCollide = true
  59. FakeCharacter.Parent = workspace
  60. FakeCharacter.HumanoidRootPart.CFrame = Part.CFrame * CFrame.new(0, 5, 0)
  61.  
  62. for i, v in pairs(RealCharacter:GetChildren()) do
  63. if v:IsA("LocalScript") then
  64. local clone = v:Clone()
  65. clone.Disabled = true
  66. clone.Parent = FakeCharacter
  67. end
  68. end
  69. if Transparency then
  70. for i, v in pairs(FakeCharacter:GetDescendants()) do
  71. if v:IsA("BasePart") then
  72. v.Transparency = 0.7
  73. end
  74. end
  75. end
  76. RealCharacter.Humanoid.Died:Connect(function()
  77. RealCharacter:Destroy()
  78. FakeCharacter:Destroy()
  79. end)
  80. Player.CharacterAppearanceLoaded:Connect(RealCharacterDied)
  81. end
  82. RealCharacter.Humanoid.Died:Connect(function()
  83. RealCharacter:Destroy()
  84. FakeCharacter:Destroy()
  85. end)
  86. Player.CharacterAppearanceLoaded:Connect(RealCharacterDied)
  87. local PseudoAnchor
  88. game:GetService "RunService".RenderStepped:Connect(
  89. function()
  90. if PseudoAnchor ~= nil then
  91. PseudoAnchor.CFrame = Part.CFrame * CFrame.new(0, 5, 0)
  92. end
  93. if NoClip then
  94. FakeCharacter.Humanoid:ChangeState(11)
  95. end
  96. end
  97. )
  98.  
  99. PseudoAnchor = FakeCharacter.HumanoidRootPart
  100. local function Invisible()
  101. if IsInvisible == false then
  102. local StoredCF = RealCharacter.HumanoidRootPart.CFrame
  103. RealCharacter.HumanoidRootPart.CFrame = FakeCharacter.HumanoidRootPart.CFrame
  104. FakeCharacter.HumanoidRootPart.CFrame = StoredCF
  105. RealCharacter.Humanoid:UnequipTools()
  106. Player.Character = FakeCharacter
  107. workspace.CurrentCamera.CameraSubject = FakeCharacter.Humanoid
  108. PseudoAnchor = RealCharacter.HumanoidRootPart
  109. for i, v in pairs(FakeCharacter:GetChildren()) do
  110. if v:IsA("LocalScript") then
  111. v.Disabled = false
  112. end
  113. end
  114.  
  115. IsInvisible = true
  116. else
  117. local StoredCF = FakeCharacter.HumanoidRootPart.CFrame
  118. FakeCharacter.HumanoidRootPart.CFrame = RealCharacter.HumanoidRootPart.CFrame
  119.  
  120. RealCharacter.HumanoidRootPart.CFrame = StoredCF
  121.  
  122. FakeCharacter.Humanoid:UnequipTools()
  123. Player.Character = RealCharacter
  124. workspace.CurrentCamera.CameraSubject = RealCharacter.Humanoid
  125. PseudoAnchor = FakeCharacter.HumanoidRootPart
  126. for i, v in pairs(FakeCharacter:GetChildren()) do
  127. if v:IsA("LocalScript") then
  128. v.Disabled = true
  129. end
  130. end
  131. IsInvisible = false
  132. end
  133. end
  134.  
  135. game:GetService("UserInputService").InputBegan:Connect(
  136. function(key, gamep)
  137. if gamep then
  138. return
  139. end
  140. if key.KeyCode.Name:lower() == Keybind:lower() and CanInvis and RealCharacter and FakeCharacter then
  141. if RealCharacter:FindFirstChild("HumanoidRootPart") and FakeCharacter:FindFirstChild("HumanoidRootPart") then
  142. Invisible()
  143. end
  144. end
  145. end
  146. )
  147. local Sound = Instance.new("Sound",game:GetService("SoundService"))
  148. Sound.SoundId = "rbxassetid://232127604"
  149. Sound:Play()
  150. game:GetService("StarterGui"):SetCore("SendNotification",{["Title"] = "Invisible Toggle Loaded Made",["Text"] = "Press "..Keybind.." to become change visibility Made By Trigzzy#8305.",["Duration"] = 20,["Button1"] = "Okay."})
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement