Idkrandomthingyyyy

Bypassed fly script

Jun 29th, 2023
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.63 KB | None | 0 0
  1. --[[
  2. Toggle : LeftAlt (Editable in script)
  3. Fast Fly : LeftControl (Editable in script)
  4. Movement : W A S D (Editable in script)
  5. Up / Down : E / Q (Editable in script)
  6. --]]
  7.  
  8.  
  9. local Settings = {
  10.  
  11. Speed = 5,
  12. SprintSpeed = 30,
  13. ToggleKey = Enum.KeyCode.LeftAlt,
  14. SprintKey = Enum.KeyCode.LeftControl,
  15.  
  16. ForwardKey = Enum.KeyCode.W,
  17. LeftKey = Enum.KeyCode.A,
  18. BackwardKey = Enum.KeyCode.S,
  19. RightKey = Enum.KeyCode.D,
  20. UpKey = Enum.KeyCode.E,
  21. DownKey = Enum.KeyCode.Q,
  22.  
  23. }
  24.  
  25. local Screen = Instance.new("ScreenGui",game.CoreGui)
  26. local Distance = Instance.new("TextLabel",Screen)
  27. Distance.BackgroundTransparency = 1
  28. Distance.Size = UDim2.new(0,10,0,10)
  29. Distance.ZIndex = 2
  30. Distance.Text = "0"
  31. Distance.TextStrokeTransparency = .5
  32. Distance.TextSize = 20
  33. Distance.TextStrokeColor3 = Color3.fromRGB(33, 33, 33)
  34. Distance.Font = Enum.Font.Gotham
  35. Distance.TextColor3 = Color3.new(1,1,1)
  36. Distance.TextXAlignment = Enum.TextXAlignment.Left
  37. Distance.TextYAlignment = Enum.TextYAlignment.Top
  38.  
  39.  
  40. local Mouse = game.Players.LocalPlayer:GetMouse()
  41. local Direction = Vector3.new(0,0,0)
  42. local InterpolatedDir = Direction
  43. local Tilt = 0
  44. local InterpolatedTilt = Tilt
  45. local RunService = game:GetService("RunService")
  46. local Toggled = false
  47. local Sprinting = false
  48. local CameraPos = game.Workspace.CurrentCamera.CFrame.Position
  49.  
  50. pcall(function()
  51. game.Players.LocalPlayer.DevCameraOcclusionMode = Enum.DevCameraOcclusionMode.Invisicam
  52. end)
  53.  
  54. function Lerp(a, b, t)
  55. return a + (b - a) * t
  56. end
  57.  
  58. local LastPos = nil
  59.  
  60. function KeyHandler(actionName, userInputState)
  61. if true and game.Players.LocalPlayer.Character and game.Players.LocalPlayer.Character:FindFirstChild("HumanoidRootPart") then
  62. if actionName == "Toggle" and userInputState == Enum.UserInputState.Begin then
  63. Toggled = not Toggled
  64. if Toggled then
  65. LastPos = game.Players.LocalPlayer.Character.HumanoidRootPart.Position
  66. --game.Players.LocalPlayer.Character.HumanoidRootPart.Anchored = true
  67. game.Players.LocalPlayer.Character.Humanoid.PlatformStand = true
  68. else
  69. LastPos = nil
  70. game.Players.LocalPlayer.Character.Humanoid.PlatformStand = false
  71. --game.Players.LocalPlayer.Character.HumanoidRootPart.Anchored = false
  72. end
  73. elseif actionName == "Forward" then
  74. Tilt = userInputState == Enum.UserInputState.Begin and -20 or 0
  75. Direction = Vector3.new(Direction.x,Direction.y,userInputState == Enum.UserInputState.Begin and -1 or 0)
  76. elseif actionName == "Left" then
  77. Direction = Vector3.new(userInputState == Enum.UserInputState.Begin and -1 or 0,Direction.y,Direction.z)
  78. elseif actionName == "Backward" then
  79. Tilt = userInputState == Enum.UserInputState.Begin and 20 or 0
  80. Direction = Vector3.new(Direction.x,Direction.y,userInputState == Enum.UserInputState.Begin and 1 or 0)
  81. elseif actionName == "Right" then
  82. Direction = Vector3.new(userInputState == Enum.UserInputState.Begin and 1 or 0,Direction.y,Direction.z)
  83. elseif actionName == "Up" then
  84. Direction = Vector3.new(Direction.x,userInputState == Enum.UserInputState.Begin and 1 or 0,Direction.z)
  85. elseif actionName == "Down" then
  86. Direction = Vector3.new(Direction.x,userInputState == Enum.UserInputState.Begin and -1 or 0,Direction.z)
  87. elseif actionName == "Sprint" then
  88. Sprinting = userInputState == Enum.UserInputState.Begin
  89. end
  90. end
  91. end
  92.  
  93.  
  94.  
  95. game:GetService("UserInputService").InputBegan:connect(function(inputObject, gameProcessedEvent)
  96.  
  97. if inputObject.KeyCode == Settings.ToggleKey then
  98. KeyHandler("Toggle", Enum.UserInputState.Begin, inputObject)
  99. elseif inputObject.KeyCode == Settings.ForwardKey then
  100. KeyHandler("Forward", Enum.UserInputState.Begin, inputObject)
  101. elseif inputObject.KeyCode == Settings.LeftKey then
  102. KeyHandler("Left", Enum.UserInputState.Begin, inputObject)
  103. elseif inputObject.KeyCode == Settings.BackwardKey then
  104. KeyHandler("Backward", Enum.UserInputState.Begin, inputObject)
  105. elseif inputObject.KeyCode == Settings.RightKey then
  106. KeyHandler("Right", Enum.UserInputState.Begin, inputObject)
  107. elseif inputObject.KeyCode == Settings.UpKey then
  108. KeyHandler("Up", Enum.UserInputState.Begin, inputObject)
  109. elseif inputObject.KeyCode == Settings.DownKey then
  110. KeyHandler("Down", Enum.UserInputState.Begin, inputObject)
  111. elseif inputObject.KeyCode == Settings.SprintKey then
  112. KeyHandler("Sprint", Enum.UserInputState.Begin, inputObject)
  113. end
  114.  
  115.  
  116. end)
  117.  
  118.  
  119. game:GetService("UserInputService").InputEnded:connect(function(inputObject, gameProcessedEvent)
  120.  
  121. if inputObject.KeyCode == Settings.ToggleKey then
  122. KeyHandler("Toggle", Enum.UserInputState.End, inputObject)
  123. elseif inputObject.KeyCode == Settings.ForwardKey then
  124. KeyHandler("Forward", Enum.UserInputState.End, inputObject)
  125. elseif inputObject.KeyCode == Settings.LeftKey then
  126. KeyHandler("Left", Enum.UserInputState.End, inputObject)
  127. elseif inputObject.KeyCode == Settings.BackwardKey then
  128. KeyHandler("Backward", Enum.UserInputState.End, inputObject)
  129. elseif inputObject.KeyCode == Settings.RightKey then
  130. KeyHandler("Right", Enum.UserInputState.End, inputObject)
  131. elseif inputObject.KeyCode == Settings.UpKey then
  132. KeyHandler("Up", Enum.UserInputState.End, inputObject)
  133. elseif inputObject.KeyCode == Settings.DownKey then
  134. KeyHandler("Down", Enum.UserInputState.End, inputObject)
  135. elseif inputObject.KeyCode == Settings.SprintKey then
  136. KeyHandler("Sprint", Enum.UserInputState.End, inputObject)
  137. end
  138.  
  139.  
  140. end)
  141.  
  142.  
  143. RunService.RenderStepped:Connect(function()
  144. if Toggled and game.Players.LocalPlayer.Character and game.Players.LocalPlayer.Character:FindFirstChild("HumanoidRootPart") then
  145. for i,v in pairs(game.Players.LocalPlayer.Character:GetDescendants()) do
  146. if v:IsA("BasePart") then
  147. v.Velocity = Vector3.new(0,0,0)
  148. end
  149. end
  150. local RootPart = game.Players.LocalPlayer.Character.HumanoidRootPart
  151. if LastPos then
  152. Distance.Text = math.floor((LastPos-RootPart.Position).Magnitude+.5)
  153. if (LastPos-RootPart.Position).Magnitude >= 350 then
  154. Distance.TextColor3 = Color3.new(1,0,0)
  155. else
  156. Distance.TextColor3 = Color3.new(1,1,1)
  157. end
  158. else
  159. Distance.TextColor3 = Color3.new(1,1,1)
  160. Distance.Text = 0
  161. end
  162. InterpolatedDir = InterpolatedDir:Lerp((Direction * (Sprinting and Settings.SprintSpeed or Settings.Speed)),.2)
  163. InterpolatedTilt = Lerp(InterpolatedTilt ,Tilt* (Sprinting and 2 or 1),Tilt == 0 and .2 or .1)
  164. RootPart.CFrame = RootPart.CFrame:Lerp(CFrame.new(RootPart.Position,RootPart.Position + Mouse.UnitRay.Direction) * CFrame.Angles(0,math.rad(00),0) * CFrame.new(InterpolatedDir) * CFrame.Angles(math.rad(InterpolatedTilt),0,0),.2)
  165. else
  166. Distance.TextColor3 = Color3.new(1,1,1)
  167. Distance.Text = 0
  168. end
  169. end)
Add Comment
Please, Sign In to add comment