atai8676

better fly gui

Mar 11th, 2025
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.99 KB | None | 0 0
  1. local main = Instance.new("ScreenGui")
  2. local Frame = Instance.new("Frame")
  3. local up = Instance.new("TextButton")
  4. local down = Instance.new("TextButton")
  5. local onof = Instance.new("TextButton")
  6. local TextLabel = Instance.new("TextLabel")
  7. local plus = Instance.new("TextButton")
  8. local speed = Instance.new("TextLabel")
  9. local mine = Instance.new("TextButton")
  10. local closebutton = Instance.new("TextButton")
  11. local mini = Instance.new("TextButton")
  12. local mini2 = Instance.new("TextButton")
  13.  
  14. main.Name = "main"
  15. main.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
  16. main.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  17. main.ResetOnSpawn = false
  18.  
  19. Frame.Parent = main
  20. Frame.BackgroundColor3 = Color3.fromRGB(163, 255, 137)
  21. Frame.BorderColor3 = Color3.fromRGB(103, 221, 213)
  22. Frame.Position = UDim2.new(0.100320168, 0, 0.379746825, 0)
  23. Frame.Size = UDim2.new(0, 190, 0, 57)
  24.  
  25.  
  26.  
  27. onof.Name = "onof"
  28. onof.Parent = Frame
  29. onof.BackgroundColor3 = Color3.fromRGB(255, 249, 74)
  30. onof.Position = UDim2.new(0.702823281, 0, 0.491228074, 0)
  31. onof.Size = UDim2.new(0, 56, 0, 28)
  32. onof.Font = Enum.Font.SourceSans
  33. onof.Text = "fly"
  34. onof.TextColor3 = Color3.fromRGB(0, 0, 0)
  35. onof.TextSize = 14.000
  36.  
  37. TextLabel.Parent = Frame
  38. TextLabel.BackgroundColor3 = Color3.fromRGB(242, 60, 255)
  39. TextLabel.Position = UDim2.new(0.469327301, 0, 0, 0)
  40. TextLabel.Size = UDim2.new(0, 100, 0, 28)
  41. TextLabel.Font = Enum.Font.SourceSans
  42. TextLabel.Text = "lol u suck:)"
  43. TextLabel.TextColor3 = Color3.fromRGB(0, 0, 0)
  44. TextLabel.TextScaled = true
  45. TextLabel.TextSize = 14.000
  46. TextLabel.TextWrapped = true
  47.  
  48. plus.Name = "plus"
  49. plus.Parent = Frame
  50. plus.BackgroundColor3 = Color3.fromRGB(133, 145, 255)
  51. plus.Position = UDim2.new(0.231578946, 0, 0, 0)
  52. plus.Size = UDim2.new(0, 45, 0, 28)
  53. plus.Font = Enum.Font.SourceSans
  54. plus.Text = "+"
  55. plus.TextColor3 = Color3.fromRGB(0, 0, 0)
  56. plus.TextScaled = true
  57. plus.TextSize = 14.000
  58. plus.TextWrapped = true
  59.  
  60. speed.Name = "ishowspeed"
  61. speed.Parent = Frame
  62. speed.BackgroundColor3 = Color3.fromRGB(255, 85, 0)
  63. speed.Position = UDim2.new(0.468421042, 0, 0.491228074, 0)
  64. speed.Size = UDim2.new(0, 44, 0, 28)
  65. speed.Font = Enum.Font.SourceSans
  66. speed.Text = "1"
  67. speed.TextColor3 = Color3.fromRGB(0, 0, 0)
  68. speed.TextScaled = true
  69. speed.TextSize = 14.000
  70. speed.TextWrapped = true
  71.  
  72. mine.Name = "mine"
  73. mine.Parent = Frame
  74. mine.BackgroundColor3 = Color3.fromRGB(123, 255, 247)
  75. mine.Position = UDim2.new(0.231578946, 0, 0.491228074, 0)
  76. mine.Size = UDim2.new(0, 45, 0, 29)
  77. mine.Font = Enum.Font.SourceSans
  78. mine.Text = "-"
  79. mine.TextColor3 = Color3.fromRGB(0, 0, 0)
  80. mine.TextScaled = true
  81. mine.TextSize = 14.000
  82. mine.TextWrapped = true
  83.  
  84. closebutton.Name = "Close"
  85. closebutton.Parent = main.Frame
  86. closebutton.BackgroundColor3 = Color3.fromRGB(225, 25, 0)
  87. closebutton.Font = "SourceSans"
  88. closebutton.Size = UDim2.new(0, 45, 0, 28)
  89. closebutton.Text = ":)"
  90. closebutton.TextSize = 30
  91. closebutton.Position = UDim2.new(0, 0, -1, 27)
  92.  
  93. mini.Name = "minimize"
  94. mini.Parent = main.Frame
  95. mini.BackgroundColor3 = Color3.fromRGB(192, 150, 230)
  96. mini.Font = "SourceSans"
  97. mini.Size = UDim2.new(0, 45, 0, 28)
  98. mini.Text = "no"
  99. mini.TextSize = 40
  100. mini.Position = UDim2.new(0, 44, -1, 27)
  101.  
  102. mini2.Name = "minimize2"
  103. mini2.Parent = main.Frame
  104. mini2.BackgroundColor3 = Color3.fromRGB(192, 150, 230)
  105. mini2.Font = "SourceSans"
  106. mini2.Size = UDim2.new(0, 45, 0, 28)
  107. mini2.Text = "+"
  108. mini2.TextSize = 40
  109. mini2.Position = UDim2.new(0, 44, -1, 57)
  110. mini2.Visible = false
  111.  
  112. speeds = 1
  113.  
  114. local speaker = game:GetService("Players").LocalPlayer
  115.  
  116. local chr = game.Players.LocalPlayer.Character
  117. local hum = chr and chr:FindFirstChildWhichIsA("Humanoid")
  118.  
  119. nowe = false
  120.  
  121. game:GetService("StarterGui"):SetCore("SendNotification", {
  122. Title = "fly gui lol";
  123. Text = "by atai8676 follow me on roblox";
  124. Icon = "rbxthumb://type=Asset&id=5107182114&w=150&h=150"})
  125. Duration = 5;
  126.  
  127. Frame.Active = true -- main = gui
  128. Frame.Draggable = true
  129.  
  130. onof.MouseButton1Down:connect(function()
  131.  
  132. if nowe == true then
  133. nowe = false
  134.  
  135. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Climbing,true)
  136. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.FallingDown,true)
  137. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Flying,true)
  138. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Freefall,true)
  139. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.GettingUp,true)
  140. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Jumping,true)
  141. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Landed,true)
  142. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Physics,true)
  143. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.PlatformStanding,true)
  144. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Ragdoll,true)
  145. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Running,true)
  146. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.RunningNoPhysics,true)
  147. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Seated,true)
  148. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.StrafingNoPhysics,true)
  149. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Swimming,true)
  150. speaker.Character.Humanoid:ChangeState(Enum.HumanoidStateType.RunningNoPhysics)
  151. else
  152. nowe = true
  153.  
  154.  
  155.  
  156. for i = 1, speeds do
  157. spawn(function()
  158.  
  159. local hb = game:GetService("RunService").Heartbeat
  160.  
  161.  
  162. tpwalking = true
  163. local chr = game.Players.LocalPlayer.Character
  164. local hum = chr and chr:FindFirstChildWhichIsA("Humanoid")
  165. while tpwalking and hb:Wait() and chr and hum and hum.Parent do
  166. if hum.MoveDirection.Magnitude > 0 then
  167. chr:TranslateBy(hum.MoveDirection)
  168. end
  169. end
  170.  
  171. end)
  172. end
  173. game.Players.LocalPlayer.Character.Animate.Disabled = true
  174. local Char = game.Players.LocalPlayer.Character
  175. local Hum = Char:FindFirstChildOfClass("Humanoid") or Char:FindFirstChildOfClass("AnimationController")
  176.  
  177. for i,v in next, Hum:GetPlayingAnimationTracks() do
  178. v:AdjustSpeed(0)
  179. end
  180. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Climbing,false)
  181. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.FallingDown,false)
  182. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Flying,false)
  183. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Freefall,false)
  184. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.GettingUp,false)
  185. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Jumping,false)
  186. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Landed,false)
  187. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Physics,false)
  188. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.PlatformStanding,false)
  189. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Ragdoll,false)
  190. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Running,false)
  191. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.RunningNoPhysics,false)
  192. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Seated,false)
  193. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.StrafingNoPhysics,false)
  194. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Swimming,false)
  195. speaker.Character.Humanoid:ChangeState(Enum.HumanoidStateType.Swimming)
  196. end
  197.  
  198.  
  199.  
  200.  
  201. if game:GetService("Players").LocalPlayer.Character:FindFirstChildOfClass("Humanoid").RigType == Enum.HumanoidRigType.R6 then
  202.  
  203.  
  204.  
  205. local plr = game.Players.LocalPlayer
  206. local torso = plr.Character.Torso
  207. local flying = true
  208. local deb = true
  209. local ctrl = {f = 0, b = 0, l = 0, r = 0}
  210. local lastctrl = {f = 0, b = 0, l = 0, r = 0}
  211. local maxspeed = 50
  212. local speed = 0
  213.  
  214.  
  215. local bg = Instance.new("BodyGyro", torso)
  216. bg.P = 9e4
  217. bg.maxTorque = Vector3.new(9e9, 9e9, 9e9)
  218. bg.cframe = torso.CFrame
  219. local bv = Instance.new("BodyVelocity", torso)
  220. bv.velocity = Vector3.new(0,0.1,0)
  221. bv.maxForce = Vector3.new(9e9, 9e9, 9e9)
  222. if nowe == true then
  223. plr.Character.Humanoid.PlatformStand = true
  224. end
  225. while nowe == true or game:GetService("Players").LocalPlayer.Character.Humanoid.Health == 0 do
  226. game:GetService("RunService").RenderStepped:Wait()
  227.  
  228. if ctrl.l + ctrl.r ~= 0 or ctrl.f + ctrl.b ~= 0 then
  229. speed = speed+.5+(speed/maxspeed)
  230. if speed > maxspeed then
  231. speed = maxspeed
  232. end
  233. elseif not (ctrl.l + ctrl.r ~= 0 or ctrl.f + ctrl.b ~= 0) and speed ~= 0 then
  234. speed = speed-1
  235. if speed < 0 then
  236. speed = 0
  237. end
  238. end
  239. if (ctrl.l + ctrl.r) ~= 0 or (ctrl.f + ctrl.b) ~= 0 then
  240. 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
  241. lastctrl = {f = ctrl.f, b = ctrl.b, l = ctrl.l, r = ctrl.r}
  242. elseif (ctrl.l + ctrl.r) == 0 and (ctrl.f + ctrl.b) == 0 and speed ~= 0 then
  243. 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
  244. else
  245. bv.velocity = Vector3.new(0,0,0)
  246. end
  247. -- game.Players.LocalPlayer.Character.Animate.Disabled = true
  248. bg.cframe = game.Workspace.CurrentCamera.CoordinateFrame * CFrame.Angles(-math.rad((ctrl.f+ctrl.b)*50*speed/maxspeed),0,0)
  249. end
  250. ctrl = {f = 0, b = 0, l = 0, r = 0}
  251. lastctrl = {f = 0, b = 0, l = 0, r = 0}
  252. speed = 0
  253. bg:Destroy()
  254. bv:Destroy()
  255. plr.Character.Humanoid.PlatformStand = false
  256. game.Players.LocalPlayer.Character.Animate.Disabled = false
  257. tpwalking = false
  258.  
  259.  
  260.  
  261.  
  262. else
  263. local plr = game.Players.LocalPlayer
  264. local UpperTorso = plr.Character.UpperTorso
  265. local flying = true
  266. local deb = true
  267. local ctrl = {f = 0, b = 0, l = 0, r = 0}
  268. local lastctrl = {f = 0, b = 0, l = 0, r = 0}
  269. local maxspeed = 50
  270. local speed = 0
  271.  
  272.  
  273. local bg = Instance.new("BodyGyro", UpperTorso)
  274. bg.P = 9e4
  275. bg.maxTorque = Vector3.new(9e9, 9e9, 9e9)
  276. bg.cframe = UpperTorso.CFrame
  277. local bv = Instance.new("BodyVelocity", UpperTorso)
  278. bv.velocity = Vector3.new(0,0.1,0)
  279. bv.maxForce = Vector3.new(9e9, 9e9, 9e9)
  280. if nowe == true then
  281. plr.Character.Humanoid.PlatformStand = true
  282. end
  283. while nowe == true or game:GetService("Players").LocalPlayer.Character.Humanoid.Health == 0 do
  284. wait()
  285.  
  286. if ctrl.l + ctrl.r ~= 0 or ctrl.f + ctrl.b ~= 0 then
  287. speed = speed+.5+(speed/maxspeed)
  288. if speed > maxspeed then
  289. speed = maxspeed
  290. end
  291. elseif not (ctrl.l + ctrl.r ~= 0 or ctrl.f + ctrl.b ~= 0) and speed ~= 0 then
  292. speed = speed-1
  293. if speed < 0 then
  294. speed = 0
  295. end
  296. end
  297. if (ctrl.l + ctrl.r) ~= 0 or (ctrl.f + ctrl.b) ~= 0 then
  298. 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
  299. lastctrl = {f = ctrl.f, b = ctrl.b, l = ctrl.l, r = ctrl.r}
  300. elseif (ctrl.l + ctrl.r) == 0 and (ctrl.f + ctrl.b) == 0 and speed ~= 0 then
  301. 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
  302. else
  303. bv.velocity = Vector3.new(0,0,0)
  304. end
  305.  
  306. bg.cframe = game.Workspace.CurrentCamera.CoordinateFrame * CFrame.Angles(-math.rad((ctrl.f+ctrl.b)*50*speed/maxspeed),0,0)
  307. end
  308. ctrl = {f = 0, b = 0, l = 0, r = 0}
  309. lastctrl = {f = 0, b = 0, l = 0, r = 0}
  310. speed = 0
  311. bg:Destroy()
  312. bv:Destroy()
  313. plr.Character.Humanoid.PlatformStand = false
  314. game.Players.LocalPlayer.Character.Animate.Disabled = false
  315. tpwalking = false
  316.  
  317.  
  318.  
  319. end
  320.  
  321.  
  322.  
  323.  
  324.  
  325. end)
  326.  
  327. local tis
  328.  
  329. up.MouseButton1Down:connect(function()
  330. tis = up.MouseEnter:connect(function()
  331. while tis do
  332. wait()
  333. game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame * CFrame.new(0,1,0)
  334. end
  335. end)
  336. end)
  337.  
  338. up.MouseLeave:connect(function()
  339. if tis then
  340. tis:Disconnect()
  341. tis = nil
  342. end
  343. end)
  344.  
  345. local dis
  346.  
  347. down.MouseButton1Down:connect(function()
  348. dis = down.MouseEnter:connect(function()
  349. while dis do
  350. wait()
  351. game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame * CFrame.new(0,-1,0)
  352. end
  353. end)
  354. end)
  355.  
  356. down.MouseLeave:connect(function()
  357. if dis then
  358. dis:Disconnect()
  359. dis = nil
  360. end
  361. end)
  362.  
  363.  
  364. game:GetService("Players").LocalPlayer.CharacterAdded:Connect(function(char)
  365. wait(0.7)
  366. game.Players.LocalPlayer.Character.Humanoid.PlatformStand = false
  367. game.Players.LocalPlayer.Character.Animate.Disabled = false
  368.  
  369. end)
  370.  
  371.  
  372. plus.MouseButton1Down:connect(function()
  373. speeds = speeds + 1
  374. speed.Text = speeds
  375. if nowe == true then
  376.  
  377.  
  378. tpwalking = false
  379. for i = 1, speeds do
  380. spawn(function()
  381.  
  382. local hb = game:GetService("RunService").Heartbeat
  383.  
  384.  
  385. tpwalking = true
  386. local chr = game.Players.LocalPlayer.Character
  387. local hum = chr and chr:FindFirstChildWhichIsA("Humanoid")
  388. while tpwalking and hb:Wait() and chr and hum and hum.Parent do
  389. if hum.MoveDirection.Magnitude > 0 then
  390. chr:TranslateBy(hum.MoveDirection)
  391. end
  392. end
  393.  
  394. end)
  395. end
  396. end
  397. end)
  398. mine.MouseButton1Down:connect(function()
  399. if speeds == 1 then
  400. speed.Text = 'no 0 :)'
  401. wait(1)
  402. speed.Text = speeds
  403. else
  404. speeds = speeds - 1
  405. speed.Text = speeds
  406. if nowe == true then
  407. tpwalking = false
  408. for i = 1, speeds do
  409. spawn(function()
  410.  
  411. local hb = game:GetService("RunService").Heartbeat
  412.  
  413.  
  414. tpwalking = true
  415. local chr = game.Players.LocalPlayer.Character
  416. local hum = chr and chr:FindFirstChildWhichIsA("Humanoid")
  417. while tpwalking and hb:Wait() and chr and hum and hum.Parent do
  418. if hum.MoveDirection.Magnitude > 0 then
  419. chr:TranslateBy(hum.MoveDirection)
  420. end
  421. end
  422.  
  423. end)
  424. end
  425. end
  426. end
  427. end)
  428.  
  429. closebutton.MouseButton1Click:Connect(function()
  430. main:Destroy()
  431. end)
  432.  
  433. mini.MouseButton1Click:Connect(function()
  434. up.Visible = false
  435. down.Visible = false
  436. onof.Visible = false
  437. plus.Visible = false
  438. speed.Visible = false
  439. mine.Visible = false
  440. mini.Visible = false
  441. mini2.Visible = true
  442. main.Frame.BackgroundTransparency = 1
  443. closebutton.Position = UDim2.new(0, 0, -1, 57)
  444. end)
  445.  
  446. mini2.MouseButton1Click:Connect(function()
  447. up.Visible = true
  448. down.Visible = true
  449. onof.Visible = true
  450. plus.Visible = true
  451. speed.Visible = true
  452. mine.Visible = true
  453. mini.Visible = true
  454. mini2.Visible = false
  455. main.Frame.BackgroundTransparency = 0
  456. closebutton.Position = UDim2.new(0, 0, -1, 27)
  457. end)
Advertisement
Add Comment
Please, Sign In to add comment