Advertisement
fxdogxd

fix fly script

Mar 7th, 2023
134
1
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.51 KB | None | 1 0
  1. local Library = loadstring(game:HttpGet("https://raw.githubusercontent.com/xHeptc/Kavo-UI-Library/main/source.lua"))()
  2. local Window = Library.CreateLib("FX", "DarkTheme")
  3. local Tab = Window:NewTab("credit")
  4. local Section = Tab:NewSection("credit by FXdogXD")
  5.  
  6. local Tab = Window:NewTab("credit")
  7. local Section = Tab:NewSection("Section Name")
  8. Section:NewButton("ButtonText", "ButtonInfo", function()
  9. game:GetService("StarterGui"):SetCore("SendNotification",{
  10. Title = "Credits";
  11. Text = "Modified By SpekzZ";
  12. Duration = 3.5;
  13. })
  14. -- Gui to Lua
  15. -- Version: 3.2
  16.  
  17. -- Instances:
  18.  
  19. local main = Instance.new("ScreenGui")
  20. local Frame = Instance.new("Frame")
  21. local up = Instance.new("TextButton")
  22. local down = Instance.new("TextButton")
  23. local onof = Instance.new("TextButton")
  24. local TextLabel = Instance.new("TextLabel")
  25. local plus = Instance.new("TextButton")
  26. local speed = Instance.new("TextLabel")
  27. local mine = Instance.new("TextButton")
  28.  
  29. --Properties:
  30.  
  31. main.Name = "main"
  32. main.Parent = game.CoreGui
  33. main.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  34.  
  35. Frame.Parent = main
  36. Frame.BackgroundColor3 = Color3.fromRGB(163, 255, 137)
  37. Frame.BorderColor3 = Color3.fromRGB(103, 221, 213)
  38. Frame.Position = UDim2.new(0.100320168, 0, 0.379746825, 0)
  39. Frame.Size = UDim2.new(0, 190, 0, 57)
  40.  
  41. up.Name = "up"
  42. up.Parent = Frame
  43. up.BackgroundColor3 = Color3.fromRGB(79, 255, 152)
  44. up.Size = UDim2.new(0, 44, 0, 28)
  45. up.Font = Enum.Font.SourceSans
  46. up.Text = "UP"
  47. up.TextColor3 = Color3.fromRGB(0, 0, 0)
  48. up.TextSize = 14.000
  49.  
  50. down.Name = "down"
  51. down.Parent = Frame
  52. down.BackgroundColor3 = Color3.fromRGB(215, 255, 121)
  53. down.Position = UDim2.new(0, 0, 0.491228074, 0)
  54. down.Size = UDim2.new(0, 44, 0, 28)
  55. down.Font = Enum.Font.SourceSans
  56. down.Text = "DOWN"
  57. down.TextColor3 = Color3.fromRGB(0, 0, 0)
  58. down.TextSize = 14.000
  59.  
  60. onof.Name = "onof"
  61. onof.Parent = Frame
  62. onof.BackgroundColor3 = Color3.fromRGB(255, 249, 74)
  63. onof.Position = UDim2.new(0.702823281, 0, 0.491228074, 0)
  64. onof.Size = UDim2.new(0, 56, 0, 28)
  65. onof.Font = Enum.Font.SourceSans
  66. onof.Text = "fly"
  67. onof.TextColor3 = Color3.fromRGB(0, 0, 0)
  68. onof.TextSize = 14.000
  69.  
  70. TextLabel.Parent = Frame
  71. TextLabel.BackgroundColor3 = Color3.fromRGB(242, 60, 255)
  72. TextLabel.Position = UDim2.new(0.469327301, 0, 0, 0)
  73. TextLabel.Size = UDim2.new(0, 100, 0, 28)
  74. TextLabel.Font = Enum.Font.SourceSans
  75. TextLabel.Text = "Fly Gui V2"
  76. TextLabel.TextColor3 = Color3.fromRGB(0, 0, 0)
  77. TextLabel.TextScaled = true
  78. TextLabel.TextSize = 14.000
  79. TextLabel.TextWrapped = true
  80.  
  81. plus.Name = "plus"
  82. plus.Parent = Frame
  83. plus.BackgroundColor3 = Color3.fromRGB(133, 145, 255)
  84. plus.Position = UDim2.new(0.231578946, 0, 0, 0)
  85. plus.Size = UDim2.new(0, 45, 0, 28)
  86. plus.Font = Enum.Font.SourceSans
  87. plus.Text = "+"
  88. plus.TextColor3 = Color3.fromRGB(0, 0, 0)
  89. plus.TextScaled = true
  90. plus.TextSize = 14.000
  91. plus.TextWrapped = true
  92.  
  93. speed.Name = "speed"
  94. speed.Parent = Frame
  95. speed.BackgroundColor3 = Color3.fromRGB(255, 85, 0)
  96. speed.Position = UDim2.new(0.468421042, 0, 0.491228074, 0)
  97. speed.Size = UDim2.new(0, 44, 0, 28)
  98. speed.Font = Enum.Font.SourceSans
  99. speed.Text = "1"
  100. speed.TextColor3 = Color3.fromRGB(0, 0, 0)
  101. speed.TextScaled = true
  102. speed.TextSize = 14.000
  103. speed.TextWrapped = true
  104.  
  105. mine.Name = "mine"
  106. mine.Parent = Frame
  107. mine.BackgroundColor3 = Color3.fromRGB(123, 255, 247)
  108. mine.Position = UDim2.new(0.231578946, 0, 0.491228074, 0)
  109. mine.Size = UDim2.new(0, 45, 0, 29)
  110. mine.Font = Enum.Font.SourceSans
  111. mine.Text = "-"
  112. mine.TextColor3 = Color3.fromRGB(0, 0, 0)
  113. mine.TextScaled = true
  114. mine.TextSize = 14.000
  115. mine.TextWrapped = true
  116.  
  117. speeds = 1
  118.  
  119. local speaker = game:GetService("Players").LocalPlayer
  120.  
  121. local chr = game.Players.LocalPlayer.Character
  122. local hum = chr and chr:FindFirstChildWhichIsA("Humanoid")
  123.  
  124. nowe = false
  125.  
  126. Frame.Active = true -- main = gui
  127. Frame.Draggable = true
  128.  
  129. onof.MouseButton1Down:connect(function()
  130.  
  131. if nowe == true then
  132. nowe = false
  133.  
  134. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Climbing,true)
  135. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.FallingDown,true)
  136. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Flying,true)
  137. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Freefall,true)
  138. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.GettingUp,true)
  139. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Jumping,true)
  140. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Landed,true)
  141. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Physics,true)
  142. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.PlatformStanding,true)
  143. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Ragdoll,true)
  144. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Running,true)
  145. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.RunningNoPhysics,true)
  146. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Seated,true)
  147. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.StrafingNoPhysics,true)
  148. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Swimming,true)
  149. speaker.Character.Humanoid:ChangeState(Enum.HumanoidStateType.RunningNoPhysics)
  150. else
  151. nowe = true
  152.  
  153.  
  154.  
  155. for i = 1, speeds do
  156. spawn(function()
  157.  
  158. local hb = game:GetService("RunService").Heartbeat
  159.  
  160.  
  161. tpwalking = true
  162. local chr = game.Players.LocalPlayer.Character
  163. local hum = chr and chr:FindFirstChildWhichIsA("Humanoid")
  164. while tpwalking and hb:Wait() and chr and hum and hum.Parent do
  165. if hum.MoveDirection.Magnitude > 0 then
  166. chr:TranslateBy(hum.MoveDirection)
  167. end
  168. end
  169.  
  170. end)
  171. end
  172. game.Players.LocalPlayer.Character.Animate.Disabled = true
  173. local Char = game.Players.LocalPlayer.Character
  174. local Hum = Char:FindFirstChildOfClass("Humanoid") or Char:FindFirstChildOfClass("AnimationController")
  175.  
  176. for i,v in next, Hum:GetPlayingAnimationTracks() do
  177. v:AdjustSpeed(0)
  178. end
  179. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Climbing,false)
  180. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.FallingDown,false)
  181. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Flying,false)
  182. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Freefall,false)
  183. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.GettingUp,false)
  184. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Jumping,false)
  185. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Landed,false)
  186. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Physics,false)
  187. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.PlatformStanding,false)
  188. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Ragdoll,false)
  189. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Running,false)
  190. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.RunningNoPhysics,false)
  191. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Seated,false)
  192. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.StrafingNoPhysics,false)
  193. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Swimming,false)
  194. speaker.Character.Humanoid:ChangeState(Enum.HumanoidStateType.Swimming)
  195. end
  196.  
  197.  
  198.  
  199.  
  200.  
  201. local plr = game.Players.LocalPlayer
  202. local UpperTorso = plr.Character.LowerTorso
  203. local flying = true
  204. local deb = true
  205. local ctrl = {f = 0, b = 0, l = 0, r = 0}
  206. local lastctrl = {f = 0, b = 0, l = 0, r = 0}
  207. local maxspeed = 50
  208. local speed = 0
  209.  
  210.  
  211. local bg = Instance.new("BodyGyro", UpperTorso)
  212. bg.P = 9e4
  213. bg.maxTorque = Vector3.new(9e9, 9e9, 9e9)
  214. bg.cframe = UpperTorso.CFrame
  215. local bv = Instance.new("BodyVelocity", UpperTorso)
  216. bv.velocity = Vector3.new(0,0.1,0)
  217. bv.maxForce = Vector3.new(9e9, 9e9, 9e9)
  218. if nowe == true then
  219. plr.Character.Humanoid.PlatformStand = true
  220. end
  221. while nowe == true or game:GetService("Players").LocalPlayer.Character.Humanoid.Health == 0 do
  222. wait()
  223.  
  224. if ctrl.l + ctrl.r ~= 0 or ctrl.f + ctrl.b ~= 0 then
  225. speed = speed+.5+(speed/maxspeed)
  226. if speed > maxspeed then
  227. speed = maxspeed
  228. end
  229. elseif not (ctrl.l + ctrl.r ~= 0 or ctrl.f + ctrl.b ~= 0) and speed ~= 0 then
  230. speed = speed-1
  231. if speed < 0 then
  232. speed = 0
  233. end
  234. end
  235. if (ctrl.l + ctrl.r) ~= 0 or (ctrl.f + ctrl.b) ~= 0 then
  236. bv.velocity = ((game.Workspace.CurrentCamera.CoordinateFrame.lookVector * (ctrl.f+ctrl.b)) + ((game.Workspace.CurrentCamera.CoordinateFrame * CFrame.new(ctrl.l+ctrl.r,(ctrl.f+ctrl.b)*.2,0).p) - game.Workspace.CurrentCamera.CoordinateFrame.p))*speed
  237. lastctrl = {f = ctrl.f, b = ctrl.b, l = ctrl.l, r = ctrl.r}
  238. elseif (ctrl.l + ctrl.r) == 0 and (ctrl.f + ctrl.b) == 0 and speed ~= 0 then
  239. bv.velocity = ((game.Workspace.CurrentCamera.CoordinateFrame.lookVector * (lastctrl.f+lastctrl.b)) + ((game.Workspace.CurrentCamera.CoordinateFrame * CFrame.new(lastctrl.l+lastctrl.r,(lastctrl.f+lastctrl.b)*.2,0).p) - game.Workspace.CurrentCamera.CoordinateFrame.p))*speed
  240. else
  241. bv.velocity = Vector3.new(0,0,0)
  242. end
  243.  
  244. bg.cframe = game.Workspace.CurrentCamera.CoordinateFrame * CFrame.Angles(-math.rad((ctrl.f+ctrl.b)*50*speed/maxspeed),0,0)
  245. end
  246. ctrl = {f = 0, b = 0, l = 0, r = 0}
  247. lastctrl = {f = 0, b = 0, l = 0, r = 0}
  248. speed = 0
  249. bg:Destroy()
  250. bv:Destroy()
  251. plr.Character.Humanoid.PlatformStand = false
  252. game.Players.LocalPlayer.Character.Animate.Disabled = false
  253. tpwalking = false
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.  
  262.  
  263. end)
  264.  
  265.  
  266. up.MouseButton1Down:connect(function()
  267. game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame * CFrame.new(0,2,0)
  268.  
  269. end)
  270.  
  271.  
  272. down.MouseButton1Down:connect(function()
  273.  
  274. game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame * CFrame.new(0,-2,0)
  275.  
  276. end)
  277.  
  278.  
  279. game:GetService("Players").LocalPlayer.CharacterAdded:Connect(function(char)
  280. wait(0.7)
  281. game.Players.LocalPlayer.Character.Humanoid.PlatformStand = false
  282. game.Players.LocalPlayer.Character.Animate.Disabled = false
  283.  
  284. end)
  285.  
  286.  
  287. plus.MouseButton1Down:connect(function()
  288. speeds = speeds + 1
  289. speed.Text = speeds
  290. if nowe == true then
  291.  
  292.  
  293. tpwalking = false
  294. for i = 1, speeds do
  295. spawn(function()
  296.  
  297. local hb = game:GetService("RunService").Heartbeat
  298.  
  299.  
  300. tpwalking = true
  301. local chr = game.Players.LocalPlayer.Character
  302. local hum = chr and chr:FindFirstChildWhichIsA("Humanoid")
  303. while tpwalking and hb:Wait() and chr and hum and hum.Parent do
  304. if hum.MoveDirection.Magnitude > 0 then
  305. chr:TranslateBy(hum.MoveDirection)
  306. end
  307. end
  308.  
  309. end)
  310. end
  311. end
  312. end)
  313. mine.MouseButton1Down:connect(function()
  314. if speeds == 1 then
  315. speed.Text = 'can not be less than 1'
  316. wait(1)
  317. speed.Text = speeds
  318. else
  319. speeds = speeds - 1
  320. speed.Text = speeds
  321. if nowe == true then
  322. tpwalking = false
  323. for i = 1, speeds do
  324. spawn(function()
  325.  
  326. local hb = game:GetService("RunService").Heartbeat
  327.  
  328.  
  329. tpwalking = true
  330. local chr = game.Players.LocalPlayer.Character
  331. local hum = chr and chr:FindFirstChildWhichIsA("Humanoid")
  332. while tpwalking and hb:Wait() and chr and hum and hum.Parent do
  333. if hum.MoveDirection.Magnitude > 0 then
  334. chr:TranslateBy(hum.MoveDirection)
  335. end
  336. end
  337.  
  338. end)
  339. end
  340. end
  341. end
  342. end)
  343. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement