1. local player=game.Players.LocalPlayer
  2. local UIS=game:GetService("UserInputService")
  3. local RunService=game:GetService("RunService")
  4.  
  5. local flySpeed=50
  6. local flying=false
  7. local bodyVelocity
  8. local bodyGyro
  9.  
  10. local gui=Instance.new("ScreenGui",player:WaitForChild("PlayerGui"))
  11. gui.ResetOnSpawn=false
  12.  
  13. local frame=Instance.new("Frame",gui)
  14. frame.Size=UDim2.new(0,500,0,500)
  15. frame.Position=UDim2.new(0.5,-250,0.5,-250)
  16. frame.BackgroundColor3=Color3.fromRGB(20,0,40)
  17. Instance.new("UICorner",frame).CornerRadius=UDim.new(0,20)
  18.  
  19. local glow=Instance.new("UIStroke",frame)
  20. glow.Thickness=2
  21. RunService.RenderStepped:Connect(function()
  22. local i=(math.sin(tick()*2)+1)/2
  23. glow.Color=Color3.fromRGB(150+100*i,0,255)
  24. end)
  25.  
  26. local bgText=Instance.new("TextLabel",frame)
  27. bgText.Size=UDim2.new(1,0,1,0)
  28. bgText.Text="COOL STUDIOS: Fly +"
  29. bgText.TextScaled=true
  30. bgText.TextTransparency=0.9
  31. bgText.TextColor3=Color3.fromRGB(180,0,255)
  32. bgText.Font=Enum.Font.GothamBlack
  33. bgText.BackgroundTransparency=1
  34.  
  35. local title=Instance.new("TextLabel",frame)
  36. title.Size=UDim2.new(1,-100,0,40)
  37. title.Position=UDim2.new(0,10,0,0)
  38. title.Text="Cool Studios"
  39. title.BackgroundTransparency=1
  40. title.TextColor3=Color3.fromRGB(220,120,255)
  41. title.TextScaled=true
  42.  
  43. local dragging=false
  44. local dragStart,startPos
  45.  
  46. title.InputBegan:Connect(function(i)
  47. if i.UserInputType==Enum.UserInputType.MouseButton1 then
  48. dragging=true
  49. dragStart=i.Position
  50. startPos=frame.Position
  51. end
  52. end)
  53.  
  54. UIS.InputChanged:Connect(function(i)
  55. if dragging then
  56. local d=i.Position-dragStart
  57. frame.Position=UDim2.new(startPos.X.Scale,startPos.X.Offset+d.X,startPos.Y.Scale,startPos.Y.Offset+d.Y)
  58. end
  59. end)
  60.  
  61. UIS.InputEnded:Connect(function(i)
  62. if i.UserInputType==Enum.UserInputType.MouseButton1 then
  63. dragging=false
  64. end
  65. end)
  66.  
  67. local function topBtn(txt,x,func)
  68. local b=Instance.new("TextButton",frame)
  69. b.Size=UDim2.new(0,30,0,30)
  70. b.Position=UDim2.new(1,x,0,5)
  71. b.Text=txt
  72. b.BackgroundColor3=Color3.fromRGB(150,0,255)
  73. b.TextColor3=Color3.new(1,1,1)
  74. Instance.new("UICorner",b)
  75. b.MouseButton1Click:Connect(func)
  76. end
  77.  
  78. topBtn("X",-35,function() gui:Destroy() end)
  79.  
  80. local minimized=false
  81. topBtn("-", -70,function()
  82. minimized=not minimized
  83. for _,v in pairs(frame:GetChildren()) do
  84. if v~=title and v:IsA("GuiObject") and v.Position.Y.Offset>40 then
  85. v.Visible=not minimized
  86. end
  87. end
  88. frame:TweenSize(minimized and UDim2.new(0,500,0,40) or UDim2.new(0,500,0,500),"Out","Quad",0.3,true)
  89. end)
  90.  
  91. local function slider(y,min,max)
  92. local val=flySpeed
  93.  
  94. local l=Instance.new("TextLabel",frame)
  95. l.Size=UDim2.new(1,0,0,20)
  96. l.Position=UDim2.new(0,0,0,y)
  97. l.Text="FlySpeed: "..val
  98. l.BackgroundTransparency=1
  99. l.TextColor3=Color3.fromRGB(200,120,255)
  100.  
  101. local bar=Instance.new("Frame",frame)
  102. bar.Size=UDim2.new(0.8,0,0,6)
  103. bar.Position=UDim2.new(0.1,0,0,y+25)
  104. bar.BackgroundColor3=Color3.fromRGB(60,0,120)
  105. Instance.new("UICorner",bar)
  106.  
  107. local fill=Instance.new("Frame",bar)
  108. fill.BackgroundColor3=Color3.fromRGB(180,0,255)
  109. Instance.new("UICorner",fill)
  110.  
  111. local knob=Instance.new("Frame",bar)
  112. knob.Size=UDim2.new(0,14,0,14)
  113. knob.BackgroundColor3=Color3.fromRGB(220,120,255)
  114. Instance.new("UICorner",knob)
  115.  
  116. local function update(x)
  117. val=math.floor(min+(max-min)*x)
  118. flySpeed=val
  119. fill.Size=UDim2.new(x,0,1,0)
  120. knob.Position=UDim2.new(x,-7,0.5,-7)
  121. l.Text="FlySpeed: "..val
  122. end
  123.  
  124. update(0.2)
  125.  
  126. local dragging=false
  127. knob.InputBegan:Connect(function(i)
  128. if i.UserInputType==Enum.UserInputType.MouseButton1 then dragging=true end
  129. end)
  130.  
  131. UIS.InputEnded:Connect(function(i)
  132. if i.UserInputType==Enum.UserInputType.MouseButton1 then dragging=false end
  133. end)
  134.  
  135. UIS.InputChanged:Connect(function(i)
  136. if dragging then
  137. local x=(i.Position.X-bar.AbsolutePosition.X)/bar.AbsoluteSize.X
  138. update(math.clamp(x,0,1))
  139. end
  140. end)
  141. end
  142.  
  143. slider(80,10,2000)
  144.  
  145. local flyBtn=Instance.new("TextButton",frame)
  146. flyBtn.Size=UDim2.new(0.8,0,0,40)
  147. flyBtn.Position=UDim2.new(0.1,0,0,140)
  148. flyBtn.Text="FLY OFF"
  149. flyBtn.BackgroundColor3=Color3.fromRGB(120,0,200)
  150. flyBtn.TextColor3=Color3.new(1,1,1)
  151. Instance.new("UICorner",flyBtn)
  152.  
  153. local function startFly()
  154. local char=player.Character
  155. if not char then return end
  156. local hum=char:FindFirstChild("Humanoid")
  157. local root=char:FindFirstChild("HumanoidRootPart")
  158. if not hum or not root then return end
  159.  
  160. flying=true
  161. hum.PlatformStand=true
  162.  
  163. bodyVelocity=Instance.new("BodyVelocity",root)
  164. bodyVelocity.MaxForce=Vector3.new(9e9,9e9,9e9)
  165.  
  166. bodyGyro=Instance.new("BodyGyro",root)
  167. bodyGyro.MaxTorque=Vector3.new(9e9,9e9,9e9)
  168.  
  169. RunService.RenderStepped:Connect(function()
  170. if not flying then return end
  171. local dir=Vector3.new()
  172. local cam=workspace.CurrentCamera
  173.  
  174. if UIS:IsKeyDown(Enum.KeyCode.W) then dir+=cam.CFrame.LookVector end
  175. if UIS:IsKeyDown(Enum.KeyCode.S) then dir-=cam.CFrame.LookVector end
  176. if UIS:IsKeyDown(Enum.KeyCode.A) then dir-=cam.CFrame.RightVector end
  177. if UIS:IsKeyDown(Enum.KeyCode.D) then dir+=cam.CFrame.RightVector end
  178.  
  179. if dir.Magnitude>0 then
  180. bodyVelocity.Velocity=dir.Unit*flySpeed
  181. else
  182. bodyVelocity.Velocity=Vector3.new()
  183. end
  184.  
  185. bodyGyro.CFrame=cam.CFrame
  186. end)
  187. end
  188.  
  189. local function stopFly()
  190. flying=false
  191. if bodyVelocity then bodyVelocity:Destroy() end
  192. if bodyGyro then bodyGyro:Destroy() end
  193. end
  194.  
  195. flyBtn.MouseButton1Click:Connect(function()
  196. if flying then
  197. stopFly()
  198. flyBtn.Text="FLY OFF"
  199. else
  200. startFly()
  201. flyBtn.Text="FLY ON"
  202. end
  203. end)