Advertisement
NightGolden

fly

Sep 10th, 2024
17
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.30 KB | None | 0 0
  1. for i,v in pairs(game:GetService("CoreGui"):GetChildren()) do
  2. if v.Name == "AWFly" then
  3. v:Destroy()
  4. end
  5. end
  6.  
  7. local AWFly = Instance.new("ScreenGui")
  8. local FlyFrame = Instance.new("Frame")
  9. local UICorner = Instance.new("UICorner")
  10. local DropShadowHolder = Instance.new("Frame")
  11. local DropShadow = Instance.new("ImageLabel")
  12. local Icon = Instance.new("ImageLabel")
  13. local Text = Instance.new("TextLabel")
  14. local Fly = Instance.new("TextButton")
  15. local UICorner_2 = Instance.new("UICorner")
  16. local plus = Instance.new("TextButton")
  17. local UICorner_3 = Instance.new("UICorner")
  18. local mine = Instance.new("TextButton")
  19. local UICorner_4 = Instance.new("UICorner")
  20. local speed = Instance.new("TextLabel")
  21. local UICorner_5 = Instance.new("UICorner")
  22.  
  23. AWFly.Name = "AWFly"
  24. AWFly.Parent = game:GetService("CoreGui")
  25.  
  26. FlyFrame.Name = "FlyFrame"
  27. FlyFrame.Parent = AWFly
  28. FlyFrame.BackgroundColor3 = Color3.fromRGB(47, 47, 47)
  29. FlyFrame.BorderColor3 = Color3.fromRGB(0, 0, 0)
  30. FlyFrame.BorderSizePixel = 0
  31. FlyFrame.Position = UDim2.new(0.832056165, 0, 0.319567978, 0)
  32. FlyFrame.Size = UDim2.new(0.135376751, 0, 0.383735716, 0)
  33.  
  34. UICorner.Parent = FlyFrame
  35.  
  36. DropShadowHolder.Name = "DropShadowHolder"
  37. DropShadowHolder.Parent = FlyFrame
  38. DropShadowHolder.BackgroundTransparency = 1.000
  39. DropShadowHolder.BorderSizePixel = 0
  40. DropShadowHolder.Size = UDim2.new(1, 0, 1, 0)
  41. DropShadowHolder.ZIndex = 0
  42.  
  43. DropShadow.Name = "DropShadow"
  44. DropShadow.Parent = DropShadowHolder
  45. DropShadow.AnchorPoint = Vector2.new(0.5, 0.5)
  46. DropShadow.BackgroundTransparency = 1.000
  47. DropShadow.BorderSizePixel = 0
  48. DropShadow.Position = UDim2.new(0.5, 0, 0.5, 0)
  49. DropShadow.Size = UDim2.new(1, 47, 1, 47)
  50. DropShadow.ZIndex = 0
  51. DropShadow.Image = "rbxassetid://6014261993"
  52. DropShadow.ImageColor3 = Color3.fromRGB(0, 0, 0)
  53. DropShadow.ImageTransparency = 0.500
  54. DropShadow.ScaleType = Enum.ScaleType.Slice
  55. DropShadow.SliceCenter = Rect.new(49, 49, 450, 450)
  56.  
  57. Icon.Name = "Icon"
  58. Icon.Parent = FlyFrame
  59. Icon.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  60. Icon.BorderColor3 = Color3.fromRGB(0, 0, 0)
  61. Icon.BorderSizePixel = 0
  62. Icon.Position = UDim2.new(0.344339609, 0, 0.205298007, 0)
  63. Icon.Size = UDim2.new(0.311320752, 0, 0.218543053, 0)
  64. Icon.Image = "http://www.roblox.com/asset/?id=17411013742"
  65.  
  66. Text.Name = "Text"
  67. Text.Parent = FlyFrame
  68. Text.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  69. Text.BackgroundTransparency = 1.000
  70. Text.BorderColor3 = Color3.fromRGB(0, 0, 0)
  71. Text.BorderSizePixel = 0
  72. Text.Position = UDim2.new(0.325471699, 0, 0, 0)
  73. Text.Size = UDim2.new(0.349056602, 0, 0.165562913, 0)
  74. Text.Font = Enum.Font.SourceSansBold
  75. Text.Text = "飞行"
  76. Text.TextColor3 = Color3.fromRGB(255, 255, 255)
  77. Text.TextScaled = true
  78. Text.TextSize = 14.000
  79. Text.TextWrapped = true
  80. Text.TextXAlignment = Enum.TextXAlignment.Left
  81.  
  82. Fly.Name = "Fly"
  83. Fly.Parent = FlyFrame
  84. Fly.BackgroundColor3 = Color3.fromRGB(39, 39, 39)
  85. Fly.BorderColor3 = Color3.fromRGB(0, 0, 0)
  86. Fly.BorderSizePixel = 0
  87. Fly.Position = UDim2.new(0.0283018872, 0, 0.778145671, 0)
  88. Fly.Size = UDim2.new(0.943396211, 0, 0.165562913, 0)
  89. Fly.Font = Enum.Font.SourceSansBold
  90. Fly.Text = "起飞"
  91. Fly.TextColor3 = Color3.fromRGB(255, 255, 255)
  92. Fly.TextScaled = true
  93. Fly.TextSize = 14.000
  94. Fly.TextWrapped = true
  95.  
  96. UICorner_2.CornerRadius = UDim.new(0, 30)
  97. UICorner_2.Parent = Fly
  98.  
  99. plus.Name = "plus"
  100. plus.Parent = FlyFrame
  101. plus.BackgroundColor3 = Color3.fromRGB(39, 39, 39)
  102. plus.BorderColor3 = Color3.fromRGB(0, 0, 0)
  103. plus.BorderSizePixel = 0
  104. plus.Position = UDim2.new(0.183962271, 0, 0.427152306, 0)
  105. plus.Size = UDim2.new(0.235849053, 0, 0.165562913, 0)
  106. plus.Font = Enum.Font.SourceSans
  107. plus.Text = "+1"
  108. plus.TextColor3 = Color3.fromRGB(255, 255, 255)
  109. plus.TextScaled = true
  110. plus.TextSize = 14.000
  111. plus.TextWrapped = true
  112.  
  113. UICorner_3.CornerRadius = UDim.new(0, 30)
  114. UICorner_3.Parent = plus
  115.  
  116. mine.Name = "mine"
  117. mine.Parent = FlyFrame
  118. mine.BackgroundColor3 = Color3.fromRGB(39, 39, 39)
  119. mine.BorderColor3 = Color3.fromRGB(0, 0, 0)
  120. mine.BorderSizePixel = 0
  121. mine.Position = UDim2.new(0.580188692, 0, 0.427152306, 0)
  122. mine.Size = UDim2.new(0.235849053, 0, 0.165562913, 0)
  123. mine.Font = Enum.Font.SourceSans
  124. mine.Text = "-1"
  125. mine.TextColor3 = Color3.fromRGB(255, 255, 255)
  126. mine.TextScaled = true
  127. mine.TextSize = 14.000
  128. mine.TextWrapped = true
  129.  
  130. UICorner_4.CornerRadius = UDim.new(0, 30)
  131. UICorner_4.Parent = mine
  132.  
  133. speed.Name = "speed"
  134. speed.Parent = FlyFrame
  135. speed.BackgroundColor3 = Color3.fromRGB(39, 39, 39)
  136. speed.BorderColor3 = Color3.fromRGB(0, 0, 0)
  137. speed.BorderSizePixel = 0
  138. speed.Position = UDim2.new(0.183962271, 0, 0.594370842, 0)
  139. speed.Size = UDim2.new(0.632075489, 0, 0.168874174, 0)
  140. speed.Font = Enum.Font.SourceSans
  141. speed.Text = "速度: 1"
  142. speed.TextColor3 = Color3.fromRGB(255, 255, 255)
  143. speed.TextScaled = true
  144. speed.TextSize = 14.000
  145. speed.TextWrapped = true
  146.  
  147. UICorner_5.CornerRadius = UDim.new(0, 10)
  148. UICorner_5.Parent = speed
  149.  
  150. speeds = 1
  151.  
  152. local speaker = game:GetService("Players").LocalPlayer
  153.  
  154. local chr = speaker.Character
  155.  
  156. local hum = chr and chr:FindFirstChildWhichIsA("Humanoid")
  157.  
  158. nowe = false
  159.  
  160. FlyFrame.Active = true -- main = gui
  161.  
  162. FlyFrame.Draggable = true
  163.  
  164. Fly.MouseButton1Down:connect(function()
  165.  
  166. if nowe == true then nowe = false
  167.  
  168. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Climbing,true)
  169.  
  170. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.FallingDown,true)
  171.  
  172. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Flying,true)
  173.  
  174. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Freefall,true)
  175.  
  176. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.GettingUp,true)
  177.  
  178. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Jumping,true)
  179.  
  180. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Landed,true)
  181.  
  182. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Physics,true)
  183.  
  184. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.PlatformStanding,true)
  185.  
  186. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Ragdoll,true)
  187.  
  188. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Running,true)
  189.  
  190. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.RunningNoPhysics,true)
  191.  
  192. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Seated,true)
  193.  
  194. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.StrafingNoPhysics,true)
  195.  
  196. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Swimming,true)
  197.  
  198. speaker.Character.Humanoid:ChangeState(Enum.HumanoidStateType.RunningNoPhysics)
  199.  
  200. else
  201.  
  202. nowe = true
  203.  
  204. for i = 1, speeds do
  205.  
  206. spawn(function()
  207.  
  208. local hb = game:GetService("RunService").Heartbeat
  209.  
  210. tpwalking = true
  211.  
  212. local chr = speaker.Character
  213.  
  214. local hum = chr and chr:FindFirstChildWhichIsA("Humanoid")
  215.  
  216. while tpwalking and hb:Wait() and chr and hum and hum.Parent do
  217.  
  218. if hum.MoveDirection.Magnitude > 0 then
  219.  
  220. chr:TranslateBy(hum.MoveDirection)
  221.  
  222. end
  223.  
  224. end
  225.  
  226. end)
  227.  
  228. end
  229.  
  230. speaker.Character.Animate.Disabled = true
  231.  
  232. local Char = speaker.Character
  233.  
  234. local Hum = Char:FindFirstChildOfClass("Humanoid") or Char:FindFirstChildOfClass("AnimationController")
  235.  
  236. for i,v in next, Hum:GetPlayingAnimationTracks() do
  237.  
  238. v:AdjustSpeed(0)
  239.  
  240. end
  241.  
  242. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Climbing,false)
  243.  
  244. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.FallingDown,false)
  245.  
  246. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Flying,false)
  247.  
  248. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Freefall,false)
  249.  
  250. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.GettingUp,false)
  251.  
  252. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Jumping,false)
  253.  
  254. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Landed,false)
  255.  
  256. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Physics,false)
  257.  
  258. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.PlatformStanding,false)
  259.  
  260. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Ragdoll,false)
  261.  
  262. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Running,false)
  263.  
  264. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.RunningNoPhysics,false)
  265.  
  266. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Seated,false)
  267.  
  268. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.StrafingNoPhysics,false)
  269.  
  270. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Swimming,false)
  271.  
  272. speaker.Character.Humanoid:ChangeState(Enum.HumanoidStateType.Swimming)
  273.  
  274. end
  275.  
  276.  
  277.  
  278. local plr = speaker
  279.  
  280. local UpperTorso = plr.Character.LowerTorso
  281.  
  282. local flying = true
  283.  
  284. local deb = true
  285.  
  286. local ctrl = {f = 0, b = 0, l = 0, r = 0}
  287.  
  288. local lastctrl = {f = 0, b = 0, l = 0, r = 0}
  289.  
  290. local maxspeed = 50
  291.  
  292. local speed = 0
  293.  
  294. local bg = Instance.new("BodyGyro", UpperTorso)
  295.  
  296. bg.P = 9e4
  297.  
  298. bg.maxTorque = Vector3.new(9e9, 9e9, 9e9)
  299.  
  300. bg.cframe = UpperTorso.CFrame
  301.  
  302. local bv = Instance.new("BodyVelocity", UpperTorso)
  303.  
  304. bv.velocity = Vector3.new(0,0.1,0)
  305.  
  306. bv.maxForce = Vector3.new(9e9, 9e9, 9e9)
  307.  
  308. if nowe == true then
  309.  
  310. plr.Character.Humanoid.PlatformStand = true
  311.  
  312. end
  313.  
  314. while nowe == true or game:GetService("Players").LocalPlayer.Character.Humanoid.Health == 0 do
  315.  
  316. wait()
  317.  
  318. if ctrl.l + ctrl.r ~= 0 or ctrl.f + ctrl.b ~= 0 then
  319.  
  320. speed = speed+.5+(speed/maxspeed)
  321.  
  322. if speed > maxspeed then
  323.  
  324. speed = maxspeed
  325.  
  326. end
  327.  
  328. elseif not (ctrl.l + ctrl.r ~= 0 or ctrl.f + ctrl.b ~= 0) and speed ~= 0 then
  329.  
  330. speed = speed-1
  331.  
  332. if speed < 0 then
  333.  
  334. speed = 0
  335.  
  336. end
  337.  
  338. end
  339.  
  340. if (ctrl.l + ctrl.r) ~= 0 or (ctrl.f + ctrl.b) ~= 0 then
  341.  
  342. bv.velocity = ((game:GetService("Workspace").CurrentCamera.CoordinateFrame.lookVector * (ctrl.f+ctrl.b)) + ((game:GetService("Workspace").CurrentCamera.CoordinateFrame * CFrame.new(ctrl.l+ctrl.r,(ctrl.f+ctrl.b)*.2,0).p) - game:GetService("Workspace").CurrentCamera.CoordinateFrame.p))*speed
  343.  
  344. lastctrl = {f = ctrl.f, b = ctrl.b, l = ctrl.l, r = ctrl.r}
  345.  
  346. elseif (ctrl.l + ctrl.r) == 0 and (ctrl.f + ctrl.b) == 0 and speed ~= 0 then
  347.  
  348. bv.velocity = ((game:GetService("Workspace").CurrentCamera.CoordinateFrame.lookVector * (lastctrl.f+lastctrl.b)) + ((game:GetService("Workspace").CurrentCamera.CoordinateFrame * CFrame.new(lastctrl.l+lastctrl.r,(lastctrl.f+lastctrl.b)*.2,0).p) - game:GetService("Workspace").CurrentCamera.CoordinateFrame.p))*speed
  349.  
  350. else
  351.  
  352. bv.velocity = Vector3.new(0,0,0)
  353.  
  354. end
  355.  
  356. bg.cframe = game:GetService("Workspace").CurrentCamera.CoordinateFrame * CFrame.Angles(-math.rad((ctrl.f+ctrl.b)*50*speed/maxspeed),0,0)
  357.  
  358. end
  359.  
  360. ctrl = {f = 0, b = 0, l = 0, r = 0}
  361.  
  362. lastctrl = {f = 0, b = 0, l = 0, r = 0}
  363.  
  364. speed = 0
  365.  
  366. bg:Destroy()
  367.  
  368. bv:Destroy()
  369.  
  370. plr.Character.Humanoid.PlatformStand = false
  371.  
  372. speaker.Character.Animate.Disabled = false
  373.  
  374. tpwalking = false
  375.  
  376.  
  377.  
  378. end)
  379.  
  380.  
  381. game:GetService("Players").LocalPlayer.CharacterAdded:Connect(function(char)
  382.  
  383. wait(0.7)
  384.  
  385. speaker.Character.Humanoid.PlatformStand = false
  386.  
  387. speaker.Character.Animate.Disabled = false
  388.  
  389. end)
  390.  
  391. plus.MouseButton1Down:connect(function()
  392.  
  393. speeds = speeds + 1
  394.  
  395. speed.Text = '速度: '..speeds
  396.  
  397. if nowe == true then
  398.  
  399.  
  400.  
  401. tpwalking = false
  402.  
  403. for i = 1, speeds do
  404.  
  405. spawn(function()
  406.  
  407. local hb = game:GetService("RunService").Heartbeat
  408.  
  409. tpwalking = true
  410.  
  411. local chr = speaker.Character
  412.  
  413. local hum = chr and chr:FindFirstChildWhichIsA("Humanoid")
  414.  
  415. while tpwalking and hb:Wait() and chr and hum and hum.Parent do
  416.  
  417. if hum.MoveDirection.Magnitude > 0 then
  418.  
  419. chr:TranslateBy(hum.MoveDirection)
  420.  
  421. end
  422.  
  423. end
  424.  
  425. end)
  426.  
  427. end
  428.  
  429. end
  430.  
  431. end)
  432.  
  433. mine.MouseButton1Down:connect(function()
  434.  
  435. if speeds == 1 then
  436.  
  437. speed.Text = '速度无法小于1!'
  438.  
  439. wait(1)
  440.  
  441. speed.Text = '速度: '..speeds
  442.  
  443. else
  444.  
  445. speeds = speeds - 1
  446.  
  447. speed.Text = '速度: '..speeds
  448.  
  449. if nowe == true then
  450.  
  451. tpwalking = false
  452.  
  453. for i = 1, speeds do
  454.  
  455. spawn(function()
  456.  
  457. local hb = game:GetService("RunService").Heartbeat
  458.  
  459. tpwalking = true
  460.  
  461. local chr = speaker.Character
  462.  
  463. local hum = chr and chr:FindFirstChildWhichIsA("Humanoid")
  464.  
  465. while tpwalking and hb:Wait() and chr and hum and hum.Parent do
  466.  
  467. if hum.MoveDirection.Magnitude > 0 then
  468.  
  469. chr:TranslateBy(hum.MoveDirection)
  470.  
  471. end
  472.  
  473. end
  474.  
  475. end)
  476.  
  477. end
  478.  
  479. end
  480.  
  481. end
  482.  
  483. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement