A_GUES

Fly v3

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