sucksuck

Untitled

Feb 21st, 2024
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.15 KB | None | 0 0
  1. FLYKEY = "f"
  2. NOCLIPKEY = "x" -- you can edit the key inbetween the quoatation marks to whatever key you want for both of these
  3.  
  4. ----------------------------------------------
  5.  
  6. repeat wait() until game:FindFirstChild("Players") ~= nil
  7. repeat wait() until game.Players.LocalPlayer ~= nil
  8.  
  9. firstfly = true
  10. flying = false
  11. flyspeed = 2
  12. mouse = game.Players.LocalPlayer:GetMouse()
  13. FLYKEY = string.upper(FLYKEY)
  14. NOCLIPKEY = string.upper(NOCLIPKEY)
  15. local meta = getrawmetatable(game) -- rip free exploits :sob:
  16. local namecall = meta.__namecall
  17. local newindex = meta.__newindex
  18. local index = meta.__index
  19. setreadonly(meta,false)
  20. fakemodel = Instance.new("Model")
  21. fakemodel.Parent = game.Workspace
  22. fakehumanoid = Instance.new("Humanoid")
  23. fakevalue = Instance.new("BoolValue")
  24. fakevalue.Value = false
  25.  
  26. meta.__newindex=function(self,k,new)
  27. if not checkcaller() then
  28. local Script=getfenv(2).script
  29. if k == "CFrame" then
  30. if self.Parent == game.Players.LocalPlayer.Character then
  31. return
  32. end
  33. end
  34. if tostring(self) == "Humanoid" and tostring(k) == "Health" then
  35. return newindex(fakehumanoid,k,new)
  36. end
  37. end
  38. return newindex(self,k,new)
  39. end
  40.  
  41. meta.__namecall=function(self,...)
  42. if not checkcaller() then
  43. local Args={...}
  44. local method = getnamecallmethod()
  45. if method == "Destroy" and tostring(self) == "BodyGyro" or method == "Destroy" and tostring(self) == "BodyVelocity" then
  46. local destroybait = Instance.new("Part", game.Workspace)
  47. return namecall(destroybait,...)
  48. end
  49. if method == "BreakJoints" and tostring(self) == game.Players.LocalPlayer.Character.Name then
  50. return namecall(fakemodel,...)
  51. end
  52. end
  53. return namecall(self,...)
  54. end
  55.  
  56. meta.__index=function(self,k)
  57. local Script=getfenv(2).script
  58. if not checkcaller() then
  59. if tostring(Script)=="LocalScript" and Script.Parent == game.Players.LocalPlayer.PlayerGui then
  60. if tostring(self) == "Part" and tostring(k) == "Anchored" then
  61. return index(fakevalue,"Value") -- "CustomPhysicalProperties"
  62. end
  63. end
  64. end
  65. return index(self,k)
  66. end
  67.  
  68. function togglefly()
  69. flying = not flying
  70. local currenttext = ""
  71. if flying == true then
  72. currenttext = "FLIGHT is now turned ON!"
  73. else
  74. currenttext = "FLIGHT is now turned OFF!"
  75. end
  76. game.StarterGui:SetCore("SendNotification", {
  77. Title = "notification";
  78. Text = currenttext;
  79. Icon = "rbxassetid://2541869220";
  80. Duration = 1.3;
  81. })
  82. if flying then
  83. if game.Players.LocalPlayer.Character ~= nil then
  84. if game.Players.LocalPlayer.Character:FindFirstChild("HumanoidRootPart") and game.Players.LocalPlayer.Character:FindFirstChild("Humanoid") then
  85. local Float = Instance.new('Part', game.Players.LocalPlayer.Character)
  86. Float.Name = "Float"
  87. Float.Transparency = 1
  88. Float.Size = Vector3.new(6,1,6)
  89. Float.Anchored = true
  90. game.Players.LocalPlayer.Character.HumanoidRootPart.Anchored = true
  91. local T = game.Players.LocalPlayer.Character.HumanoidRootPart
  92. local CONTROL = {F = 0, B = 0, L = 0, R = 0}
  93. local lCONTROL = {F = 0, B = 0, L = 0, R = 0}
  94. local SPEED = 0
  95. local function FLY()
  96. FLYING = true
  97. local BG = Instance.new('BodyGyro', T)
  98. local BV = Instance.new('BodyVelocity', T)
  99. BG.P = 9e4
  100. BG.maxTorque = Vector3.new(9e9, 9e9, 9e9)
  101. BG.cframe = T.CFrame
  102. BV.velocity = Vector3.new(0, 0.1, 0)
  103. BV.maxForce = Vector3.new(9e9, 9e9, 9e9)
  104. spawn(function()
  105. repeat wait()
  106. if CONTROL.L + CONTROL.R ~= 0 or CONTROL.F + CONTROL.B ~= 0 then
  107. SPEED = 50
  108. elseif not (CONTROL.L + CONTROL.R ~= 0 or CONTROL.F + CONTROL.B ~= 0) and SPEED ~= 0 then
  109. SPEED = 0
  110. end
  111. if (CONTROL.L + CONTROL.R) ~= 0 or (CONTROL.F + CONTROL.B) ~= 0 then
  112. BV.velocity = ((workspace.CurrentCamera.CoordinateFrame.lookVector * (CONTROL.F + CONTROL.B)) + ((workspace.CurrentCamera.CoordinateFrame * CFrame.new(CONTROL.L + CONTROL.R, (CONTROL.F + CONTROL.B) * 0.2, 0).p) - workspace.CurrentCamera.CoordinateFrame.p)) * SPEED
  113. lCONTROL = {F = CONTROL.F, B = CONTROL.B, L = CONTROL.L, R = CONTROL.R}
  114. elseif (CONTROL.L + CONTROL.R) == 0 and (CONTROL.F + CONTROL.B) == 0 and SPEED ~= 0 then
  115. BV.velocity = ((workspace.CurrentCamera.CoordinateFrame.lookVector * (lCONTROL.F + lCONTROL.B)) + ((workspace.CurrentCamera.CoordinateFrame * CFrame.new(lCONTROL.L + lCONTROL.R, (lCONTROL.F + lCONTROL.B) * 0.2, 0).p) - workspace.CurrentCamera.CoordinateFrame.p)) * SPEED
  116. else
  117. BV.velocity = Vector3.new(0, 0.1, 0)
  118. end
  119. BG.cframe = workspace.CurrentCamera.CoordinateFrame
  120. until not FLYING
  121. CONTROL = {F = 0, B = 0, L = 0, R = 0}
  122. lCONTROL = {F = 0, B = 0, L = 0, R = 0}
  123. SPEED = 0
  124. BG:destroy()
  125. BV:destroy()
  126. end)
  127. end
  128. mouse.KeyDown:connect(function(KEY)
  129. if KEY:lower() == 'w' then
  130. CONTROL.F = flyspeed
  131. elseif KEY:lower() == 's' then
  132. CONTROL.B = -flyspeed
  133. elseif KEY:lower() == 'a' then
  134. CONTROL.L = -flyspeed
  135. elseif KEY:lower() == 'd' then
  136. CONTROL.R = flyspeed
  137. end
  138. end)
  139. mouse.KeyUp:connect(function(KEY)
  140. if KEY:lower() == 'w' then
  141. CONTROL.F = 0
  142. elseif KEY:lower() == 's' then
  143. CONTROL.B = 0
  144. elseif KEY:lower() == 'a' then
  145. CONTROL.L = 0
  146. elseif KEY:lower() == 'd' then
  147. CONTROL.R = 0
  148. end
  149. end)
  150. FLY()
  151. game.Players.LocalPlayer.Character.HumanoidRootPart.Anchored = false
  152. end
  153. end
  154. else
  155. if game.Players.LocalPlayer.Character then
  156. if game.Players.LocalPlayer.Character:FindFirstChild("Float") then
  157. game.Players.LocalPlayer.Character:FindFirstChild("Float"):Destroy()
  158. end
  159. end
  160. local AnimationTracks = game.Players.LocalPlayer.Character.Humanoid:GetPlayingAnimationTracks()
  161. for i, track in pairs (AnimationTracks) do
  162. if track.Name ~= "WalkAnim" then
  163. track:Stop()
  164. end
  165. end
  166. FLYING = false
  167. end
  168. end
  169.  
  170. game.Players.LocalPlayer.Chatted:Connect(function(msg)
  171. lower = string.lower(msg)
  172. if string.find(lower, ":flyspeed ") or string.find(lower, "/e flyspeed ") or string.find(lower, "/e :flyspeed ") then
  173. local number = getinputname(lower)
  174. if number ~= "" and not string.find(number, "%a") then
  175. flyspeed = tonumber(number)
  176. end
  177. end
  178. end)
  179.  
  180. game:GetService("UserInputService").InputBegan:Connect(function(inputObject, gameProcessedEvent)
  181. if inputObject.KeyCode == Enum.KeyCode[FLYKEY] and gameProcessedEvent == false then
  182. if firstfly then
  183. game.StarterGui:SetCore("SendNotification", {
  184. Title = "CHANGING FLY SPEED";
  185. Text = "Use the :flyspeed NUMBER command to set your fly speed!";
  186. Icon = "rbxassetid://2541869220";
  187. Duration = 3;
  188. })
  189. firstfly = false
  190. end
  191. togglefly()
  192. end
  193. if inputObject.KeyCode == Enum.KeyCode[NOCLIPKEY] and gameProcessedEvent == false then
  194. noclip = not noclip
  195. local currenttext = ""
  196. if noclip == true then
  197. currenttext = "NoClip is now turned ON!"
  198. else
  199. currenttext = "NoClip is now turned OFF!"
  200. end
  201. game.StarterGui:SetCore("SendNotification", {
  202. Title = "notification";
  203. Text = currenttext;
  204. Icon = "rbxassetid://2541869220";
  205. Duration = 3;
  206. })
  207. end
  208. end)
  209.  
  210. game:GetService('RunService').Stepped:connect(function()
  211. if noclip == true then
  212. if game.Players.LocalPlayer.Character ~= nil then
  213. if game.Players.LocalPlayer.Character:FindFirstChild("Head") and game.Players.LocalPlayer.Character:FindFirstChild("Torso") and game.Players.LocalPlayer.Character:FindFirstChild("Humanoid") then
  214. game.Players.LocalPlayer.Character.Head.CanCollide = false
  215. game.Players.LocalPlayer.Character.Torso.CanCollide = false
  216. game.Players.LocalPlayer.Character.Humanoid.Sit = false
  217. end
  218. end
  219. end
  220. if flying then
  221. if game.Players.LocalPlayer.Character then
  222. if game.Players.LocalPlayer.Character:FindFirstChild("Humanoid") then
  223. game.Players.LocalPlayer.Character.Humanoid.PlatformStand = false
  224. game.Players.LocalPlayer.Character.Humanoid.Sit = false
  225. game.Players.LocalPlayer.Character.Humanoid:ChangeState(Enum.HumanoidStateType.Running)
  226. end
  227. if game.Players.LocalPlayer.Character:FindFirstChild("Float") then
  228. game.Players.LocalPlayer.Character:FindFirstChild("Float").CFrame = game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame * CFrame.new(0,-3.5,0)
  229. end
  230. end
  231. end
  232. end)
  233.  
  234. -- You can change the hotkeys at the top of the script
  235. -- Default is F for fly and X for noclip
  236. -- Script will only work on executors that can handle metatables and keycode (synapse x, etc)
Advertisement
Add Comment
Please, Sign In to add comment