Advertisement
xXEpicScripterXx

fly gui (roblox)

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