Messi33536086

Untitled

Mar 19th, 2026
26
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 16.67 KB | None | 0 0
  1. local TweenService = game:GetService("TweenService")
  2. local RunService = game:GetService("RunService")
  3. local Players = game:GetService("Players")
  4. local LocalPlayer = Players.LocalPlayer
  5.  
  6. local speeds = 1
  7. local nowe = false
  8. local tpwalking = false
  9. local tis, dis = nil, nil
  10. local isMinimized = false
  11.  
  12. local function NewTween(obj, t, props)
  13. return TweenService:Create(obj, TweenInfo.new(t, Enum.EasingStyle.Quart, Enum.EasingDirection.Out), props)
  14. end
  15.  
  16. local ScreenGui = Instance.new("ScreenGui")
  17. ScreenGui.Name = "CubixHubFly"
  18. ScreenGui.ResetOnSpawn = false
  19. ScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  20. ScreenGui.Parent = LocalPlayer:WaitForChild("PlayerGui")
  21.  
  22. local MainFrame = Instance.new("Frame")
  23. MainFrame.Name = "MainFrame"
  24. MainFrame.Size = UDim2.fromOffset(240, 180)
  25. MainFrame.Position = UDim2.new(0.5, -120, 0.5, -90)
  26. MainFrame.BackgroundColor3 = Color3.fromRGB(8, 8, 10)
  27. MainFrame.BorderSizePixel = 0
  28. MainFrame.Active = true
  29. MainFrame.Draggable = true
  30. MainFrame.Parent = ScreenGui
  31.  
  32. local MainCorner = Instance.new("UICorner")
  33. MainCorner.CornerRadius = UDim.new(0, 14)
  34. MainCorner.Parent = MainFrame
  35.  
  36. local MainStroke = Instance.new("UIStroke")
  37. MainStroke.Color = Color3.fromRGB(50, 50, 60)
  38. MainStroke.Thickness = 1.2
  39. MainStroke.Parent = MainFrame
  40.  
  41. local Glow = Instance.new("ImageLabel")
  42. Glow.Name = "Glow"
  43. Glow.Size = UDim2.new(1, 40, 1, 40)
  44. Glow.Position = UDim2.new(0, -20, 0, -20)
  45. Glow.BackgroundTransparency = 1
  46. Glow.Image = "rbxassetid://5028857084"
  47. Glow.ImageColor3 = Color3.fromRGB(120, 80, 220)
  48. Glow.ImageTransparency = 0.82
  49. Glow.ZIndex = 0
  50. Glow.Parent = MainFrame
  51.  
  52. local TopBar = Instance.new("Frame")
  53. TopBar.Name = "TopBar"
  54. TopBar.Size = UDim2.new(1, 0, 0, 38)
  55. TopBar.BackgroundColor3 = Color3.fromRGB(14, 12, 20)
  56. TopBar.BorderSizePixel = 0
  57. TopBar.Parent = MainFrame
  58.  
  59. local TopCorner = Instance.new("UICorner")
  60. TopCorner.CornerRadius = UDim.new(0, 14)
  61. TopCorner.Parent = TopBar
  62.  
  63. local TopFix = Instance.new("Frame")
  64. TopFix.Size = UDim2.new(1, 0, 0.5, 0)
  65. TopFix.Position = UDim2.new(0, 0, 0.5, 0)
  66. TopFix.BackgroundColor3 = Color3.fromRGB(14, 12, 20)
  67. TopFix.BorderSizePixel = 0
  68. TopFix.Parent = TopBar
  69.  
  70. local TopAccent = Instance.new("Frame")
  71. TopAccent.Size = UDim2.new(1, 0, 0, 1)
  72. TopAccent.Position = UDim2.new(0, 0, 1, -1)
  73. TopAccent.BackgroundColor3 = Color3.fromRGB(90, 55, 180)
  74. TopAccent.BorderSizePixel = 0
  75. TopAccent.Parent = TopBar
  76.  
  77. local TitleLabel = Instance.new("TextLabel")
  78. TitleLabel.Size = UDim2.new(1, -80, 1, 0)
  79. TitleLabel.Position = UDim2.new(0, 14, 0, 0)
  80. TitleLabel.BackgroundTransparency = 1
  81. TitleLabel.Text = "CUBIX HUB"
  82. TitleLabel.Font = Enum.Font.GothamBold
  83. TitleLabel.TextColor3 = Color3.fromRGB(230, 220, 255)
  84. TitleLabel.TextSize = 13
  85. TitleLabel.TextXAlignment = Enum.TextXAlignment.Left
  86. TitleLabel.Parent = TopBar
  87.  
  88. local SubLabel = Instance.new("TextLabel")
  89. SubLabel.Size = UDim2.new(0, 60, 1, 0)
  90. SubLabel.Position = UDim2.new(0, 80, 0, 0)
  91. SubLabel.BackgroundTransparency= 1
  92. SubLabel.Text = "FLY"
  93. SubLabel.Font = Enum.Font.Gotham
  94. SubLabel.TextColor3 = Color3.fromRGB(120, 80, 220)
  95. SubLabel.TextSize = 11
  96. SubLabel.TextXAlignment = Enum.TextXAlignment.Left
  97. SubLabel.Parent = TopBar
  98.  
  99. local CloseBtn = Instance.new("TextButton")
  100. CloseBtn.Name = "CloseBtn"
  101. CloseBtn.Size = UDim2.fromOffset(22, 22)
  102. CloseBtn.Position = UDim2.new(1, -30, 0.5, -11)
  103. CloseBtn.BackgroundColor3 = Color3.fromRGB(180, 40, 40)
  104. CloseBtn.Text = ""
  105. CloseBtn.BorderSizePixel = 0
  106. CloseBtn.Parent = TopBar
  107.  
  108. local CloseCorner = Instance.new("UICorner")
  109. CloseCorner.CornerRadius = UDim.new(1, 0)
  110. CloseCorner.Parent = CloseBtn
  111.  
  112. local CloseIcon = Instance.new("TextLabel")
  113. CloseIcon.Size = UDim2.new(1, 0, 1, 0)
  114. CloseIcon.BackgroundTransparency = 1
  115. CloseIcon.Text = "X"
  116. CloseIcon.Font = Enum.Font.GothamBold
  117. CloseIcon.TextColor3 = Color3.fromRGB(255, 255, 255)
  118. CloseIcon.TextSize = 10
  119. CloseIcon.Parent = CloseBtn
  120.  
  121. local MinBtn = Instance.new("TextButton")
  122. MinBtn.Name = "MinBtn"
  123. MinBtn.Size = UDim2.fromOffset(22, 22)
  124. MinBtn.Position = UDim2.new(1, -56, 0.5, -11)
  125. MinBtn.BackgroundColor3 = Color3.fromRGB(35, 30, 55)
  126. MinBtn.Text = "-"
  127. MinBtn.BorderSizePixel = 0
  128. MinBtn.Parent = TopBar
  129.  
  130. local MinCorner = Instance.new("UICorner")
  131. MinCorner.CornerRadius = UDim.new(1, 0)
  132. MinCorner.Parent = MinBtn
  133.  
  134. local MinIcon = Instance.new("TextLabel")
  135. MinIcon.Size = UDim2.new(1, 0, 1, 0)
  136. MinIcon.BackgroundTransparency = 1
  137. MinIcon.Text = "—"
  138. MinIcon.Font = Enum.Font.GothamBold
  139. MinIcon.TextColor3 = Color3.fromRGB(180, 160, 220)
  140. MinIcon.TextSize = 10
  141. MinIcon.Parent = MinBtn
  142.  
  143. local ContentFrame = Instance.new("Frame")
  144. ContentFrame.Name = "ContentFrame"
  145. ContentFrame.Size = UDim2.new(1, -24, 1, -52)
  146. ContentFrame.Position = UDim2.new(0, 12, 0, 44)
  147. ContentFrame.BackgroundTransparency = 1
  148. ContentFrame.Parent = MainFrame
  149.  
  150. local function MakeButton(parent, text, posX, posY, w, h, accent)
  151. local btn = Instance.new("TextButton")
  152. btn.Size = UDim2.fromOffset(w, h)
  153. btn.Position = UDim2.fromOffset(posX, posY)
  154. btn.BackgroundColor3 = accent or Color3.fromRGB(20, 18, 30)
  155. btn.Text = text
  156. btn.Font = Enum.Font.GothamBold
  157. btn.TextColor3 = Color3.fromRGB(210, 200, 240)
  158. btn.TextSize = 12
  159. btn.BorderSizePixel = 0
  160. btn.AutoButtonColor = false
  161. btn.Parent = parent
  162.  
  163. local c = Instance.new("UICorner")
  164. c.CornerRadius = UDim.new(0, 8)
  165. c.Parent = btn
  166.  
  167. local s = Instance.new("UIStroke")
  168. s.Color = Color3.fromRGB(55, 45, 80)
  169. s.Thickness = 1
  170. s.Parent = btn
  171.  
  172. btn.MouseEnter:Connect(function()
  173. NewTween(btn, 0.15, { BackgroundColor3 = Color3.fromRGB(35, 28, 58) }):Play()
  174. end)
  175. btn.MouseLeave:Connect(function()
  176. NewTween(btn, 0.15, { BackgroundColor3 = accent or Color3.fromRGB(20, 18, 30) }):Play()
  177. end)
  178.  
  179. return btn
  180. end
  181.  
  182. local function MakeLabel(parent, text, posX, posY, w, h)
  183. local lbl = Instance.new("TextLabel")
  184. lbl.Size = UDim2.fromOffset(w, h)
  185. lbl.Position = UDim2.fromOffset(posX, posY)
  186. lbl.BackgroundColor3 = Color3.fromRGB(20, 18, 30)
  187. lbl.Text = text
  188. lbl.Font = Enum.Font.GothamBold
  189. lbl.TextColor3 = Color3.fromRGB(180, 160, 230)
  190. lbl.TextSize = 12
  191. lbl.BorderSizePixel = 0
  192. lbl.Parent = parent
  193.  
  194. local c = Instance.new("UICorner")
  195. c.CornerRadius = UDim.new(0, 8)
  196. c.Parent = lbl
  197.  
  198. local s = Instance.new("UIStroke")
  199. s.Color = Color3.fromRGB(55, 45, 80)
  200. s.Thickness = 1
  201. s.Parent = lbl
  202.  
  203. return lbl
  204. end
  205.  
  206. local FlyBtn = MakeButton(ContentFrame, "FLY OFF", 0, 0, 100, 36, Color3.fromRGB(18, 14, 32))
  207. local UpBtn = MakeButton(ContentFrame, "▲ UP", 0, 46, 100, 36)
  208. local DownBtn = MakeButton(ContentFrame, "▼ DOWN", 0, 90, 100, 36)
  209.  
  210. local SpeedLbl = MakeLabel(ContentFrame, "1", 110, 0, 104, 36)
  211. SpeedLbl.TextSize = 16
  212.  
  213. local PlusBtn = MakeButton(ContentFrame, "+", 110, 46, 50, 36, Color3.fromRGB(22, 18, 36))
  214. local MinusBtn = MakeButton(ContentFrame, "−", 164, 46, 50, 36, Color3.fromRGB(22, 18, 36))
  215.  
  216. local SpeedHint = Instance.new("TextLabel")
  217. SpeedHint.Size = UDim2.fromOffset(104, 20)
  218. SpeedHint.Position = UDim2.fromOffset(110, 90)
  219. SpeedHint.BackgroundTransparency= 1
  220. SpeedHint.Text = "SPEED MULTIPLIER"
  221. SpeedHint.Font = Enum.Font.Gotham
  222. SpeedHint.TextColor3 = Color3.fromRGB(90, 80, 120)
  223. SpeedHint.TextSize = 8
  224. SpeedHint.Parent = ContentFrame
  225.  
  226. local StatusDot = Instance.new("Frame")
  227. StatusDot.Size = UDim2.fromOffset(8, 8)
  228. StatusDot.Position = UDim2.new(0, 6, 0.5, -4)
  229. StatusDot.BackgroundColor3 = Color3.fromRGB(80, 80, 100)
  230. StatusDot.BorderSizePixel = 0
  231. StatusDot.Parent = TopBar
  232.  
  233. local DotCorner = Instance.new("UICorner")
  234. DotCorner.CornerRadius = UDim.new(1, 0)
  235. DotCorner.Parent = StatusDot
  236.  
  237. local function SetFlyStatus(active)
  238. if active then
  239. FlyBtn.Text = "FLY ON"
  240. NewTween(FlyBtn, 0.2, { BackgroundColor3 = Color3.fromRGB(28, 18, 55) }):Play()
  241. NewTween(StatusDot, 0.2, { BackgroundColor3 = Color3.fromRGB(120, 80, 220) }):Play()
  242. FlyBtn.UIStroke.Color = Color3.fromRGB(100, 60, 200)
  243. else
  244. FlyBtn.Text = "FLY OFF"
  245. NewTween(FlyBtn, 0.2, { BackgroundColor3 = Color3.fromRGB(18, 14, 32) }):Play()
  246. NewTween(StatusDot, 0.2, { BackgroundColor3 = Color3.fromRGB(80, 80, 100) }):Play()
  247. FlyBtn.UIStroke.Color = Color3.fromRGB(55, 45, 80)
  248. end
  249. end
  250.  
  251. local speaker = LocalPlayer
  252.  
  253. FlyBtn.MouseButton1Click:Connect(function()
  254. if nowe then
  255. nowe = false
  256. SetFlyStatus(false)
  257. local char = speaker.Character
  258. if not char then return end
  259. local hum = char:FindFirstChildWhichIsA("Humanoid")
  260. if not hum then return end
  261. for _, state in ipairs({
  262. Enum.HumanoidStateType.Climbing, Enum.HumanoidStateType.FallingDown,
  263. Enum.HumanoidStateType.Flying, Enum.HumanoidStateType.Freefall,
  264. Enum.HumanoidStateType.GettingUp,Enum.HumanoidStateType.Jumping,
  265. Enum.HumanoidStateType.Landed, Enum.HumanoidStateType.Physics,
  266. Enum.HumanoidStateType.PlatformStanding, Enum.HumanoidStateType.Ragdoll,
  267. Enum.HumanoidStateType.Running, Enum.HumanoidStateType.RunningNoPhysics,
  268. Enum.HumanoidStateType.Seated, Enum.HumanoidStateType.StrafingNoPhysics,
  269. Enum.HumanoidStateType.Swimming,
  270. }) do
  271. hum:SetStateEnabled(state, true)
  272. end
  273. hum:ChangeState(Enum.HumanoidStateType.RunningNoPhysics)
  274. else
  275. nowe = true
  276. SetFlyStatus(true)
  277.  
  278. for _ = 1, speeds do
  279. task.spawn(function()
  280. local hb = RunService.Heartbeat
  281. tpwalking = true
  282. local chr = LocalPlayer.Character
  283. local hum = chr and chr:FindFirstChildWhichIsA("Humanoid")
  284. while tpwalking and hb:Wait() and chr and hum and hum.Parent do
  285. if hum.MoveDirection.Magnitude > 0 then
  286. chr:TranslateBy(hum.MoveDirection)
  287. end
  288. end
  289. end)
  290. end
  291.  
  292. local char = LocalPlayer.Character
  293. if not char then return end
  294. local hum = char:FindFirstChildWhichIsA("Humanoid") or char:FindFirstChildOfClass("AnimationController")
  295. if char:FindFirstChild("Animate") then
  296. char.Animate.Disabled = true
  297. end
  298. if hum and hum:IsA("Humanoid") then
  299. for _, track in ipairs(hum:GetPlayingAnimationTracks()) do
  300. track:AdjustSpeed(0)
  301. end
  302. end
  303.  
  304. local humObj = char:FindFirstChildWhichIsA("Humanoid")
  305. if humObj then
  306. for _, state in ipairs({
  307. Enum.HumanoidStateType.Climbing, Enum.HumanoidStateType.FallingDown,
  308. Enum.HumanoidStateType.Flying, Enum.HumanoidStateType.Freefall,
  309. Enum.HumanoidStateType.GettingUp,Enum.HumanoidStateType.Jumping,
  310. Enum.HumanoidStateType.Landed, Enum.HumanoidStateType.Physics,
  311. Enum.HumanoidStateType.PlatformStanding, Enum.HumanoidStateType.Ragdoll,
  312. Enum.HumanoidStateType.Running, Enum.HumanoidStateType.RunningNoPhysics,
  313. Enum.HumanoidStateType.Seated, Enum.HumanoidStateType.StrafingNoPhysics,
  314. Enum.HumanoidStateType.Swimming,
  315. }) do
  316. humObj:SetStateEnabled(state, false)
  317. end
  318. humObj:ChangeState(Enum.HumanoidStateType.Swimming)
  319. end
  320.  
  321. local rigType = char:FindFirstChildOfClass("Humanoid") and char:FindFirstChildOfClass("Humanoid").RigType
  322. local torso = rigType == Enum.HumanoidRigType.R6 and char:FindFirstChild("Torso") or char:FindFirstChild("UpperTorso")
  323. if not torso then return end
  324.  
  325. local bg = Instance.new("BodyGyro", torso)
  326. bg.P = 9e4
  327. bg.maxTorque = Vector3.new(9e9, 9e9, 9e9)
  328. bg.cframe = torso.CFrame
  329.  
  330. local bv = Instance.new("BodyVelocity", torso)
  331. bv.velocity = Vector3.new(0, 0.1, 0)
  332. bv.maxForce = Vector3.new(9e9, 9e9, 9e9)
  333.  
  334. if humObj then humObj.PlatformStand = true end
  335.  
  336. local ctrl = {f=0,b=0,l=0,r=0}
  337. local lastctrl = {f=0,b=0,l=0,r=0}
  338. local maxspeed = 50
  339. local spd = 0
  340.  
  341. while nowe do
  342. RunService.RenderStepped:Wait()
  343. if ctrl.l+ctrl.r ~= 0 or ctrl.f+ctrl.b ~= 0 then
  344. spd = math.min(spd + 0.5 + spd/maxspeed, maxspeed)
  345. elseif spd ~= 0 then
  346. spd = math.max(spd - 1, 0)
  347. end
  348. local cam = workspace.CurrentCamera.CoordinateFrame
  349. if (ctrl.l+ctrl.r) ~= 0 or (ctrl.f+ctrl.b) ~= 0 then
  350. bv.velocity = ((cam.lookVector * (ctrl.f+ctrl.b)) + ((cam * CFrame.new(ctrl.l+ctrl.r,(ctrl.f+ctrl.b)*.2,0).p) - cam.p)) * spd
  351. lastctrl = {f=ctrl.f,b=ctrl.b,l=ctrl.l,r=ctrl.r}
  352. elseif spd ~= 0 then
  353. bv.velocity = ((cam.lookVector * (lastctrl.f+lastctrl.b)) + ((cam * CFrame.new(lastctrl.l+lastctrl.r,(lastctrl.f+lastctrl.b)*.2,0).p) - cam.p)) * spd
  354. else
  355. bv.velocity = Vector3.new(0, 0, 0)
  356. end
  357. bg.cframe = cam * CFrame.Angles(-math.rad((ctrl.f+ctrl.b)*50*spd/maxspeed), 0, 0)
  358. end
  359.  
  360. ctrl = {f=0,b=0,l=0,r=0}
  361. lastctrl = {f=0,b=0,l=0,r=0}
  362. spd = 0
  363. bg:Destroy()
  364. bv:Destroy()
  365. if humObj then humObj.PlatformStand = false end
  366. if char:FindFirstChild("Animate") then
  367. char.Animate.Disabled = false
  368. end
  369. tpwalking = false
  370. end
  371. end)
  372.  
  373. UpBtn.MouseButton1Down:Connect(function()
  374. tis = RunService.Heartbeat:Connect(function()
  375. local char = LocalPlayer.Character
  376. if char and char:FindFirstChild("HumanoidRootPart") then
  377. char.HumanoidRootPart.CFrame *= CFrame.new(0, 0.5, 0)
  378. end
  379. end)
  380. end)
  381. UpBtn.MouseButton1Up:Connect(function()
  382. if tis then tis:Disconnect() tis = nil end
  383. end)
  384.  
  385. DownBtn.MouseButton1Down:Connect(function()
  386. dis = RunService.Heartbeat:Connect(function()
  387. local char = LocalPlayer.Character
  388. if char and char:FindFirstChild("HumanoidRootPart") then
  389. char.HumanoidRootPart.CFrame *= CFrame.new(0, -0.5, 0)
  390. end
  391. end)
  392. end)
  393. DownBtn.MouseButton1Up:Connect(function()
  394. if dis then dis:Disconnect() dis = nil end
  395. end)
  396.  
  397. PlusBtn.MouseButton1Click:Connect(function()
  398. speeds += 1
  399. SpeedLbl.Text = tostring(speeds)
  400. if nowe then
  401. tpwalking = false
  402. for _ = 1, speeds do
  403. task.spawn(function()
  404. local hb = RunService.Heartbeat
  405. tpwalking = true
  406. local chr = LocalPlayer.Character
  407. local hum = chr and chr:FindFirstChildWhichIsA("Humanoid")
  408. while tpwalking and hb:Wait() and chr and hum and hum.Parent do
  409. if hum.MoveDirection.Magnitude > 0 then chr:TranslateBy(hum.MoveDirection) end
  410. end
  411. end)
  412. end
  413. end
  414. end)
  415.  
  416. MinusBtn.MouseButton1Click:Connect(function()
  417. if speeds <= 1 then
  418. SpeedLbl.Text = "MIN"
  419. task.wait(0.8)
  420. SpeedLbl.Text = tostring(speeds)
  421. return
  422. end
  423. speeds -= 1
  424. SpeedLbl.Text = tostring(speeds)
  425. if nowe then
  426. tpwalking = false
  427. for _ = 1, speeds do
  428. task.spawn(function()
  429. local hb = RunService.Heartbeat
  430. tpwalking = true
  431. local chr = LocalPlayer.Character
  432. local hum = chr and chr:FindFirstChildWhichIsA("Humanoid")
  433. while tpwalking and hb:Wait() and chr and hum and hum.Parent do
  434. if hum.MoveDirection.Magnitude > 0 then chr:TranslateBy(hum.MoveDirection) end
  435. end
  436. end)
  437. end
  438. end
  439. end)
  440.  
  441. CloseBtn.MouseButton1Click:Connect(function()
  442. NewTween(MainFrame, 0.2, { BackgroundTransparency = 1 }):Play()
  443. task.wait(0.2)
  444. ScreenGui:Destroy()
  445. end)
  446.  
  447. MinBtn.MouseButton1Click:Connect(function()
  448. isMinimized = not isMinimized
  449. if isMinimized then
  450. NewTween(MainFrame, 0.25, { Size = UDim2.fromOffset(240, 38) }):Play()
  451. task.wait(0.05)
  452. ContentFrame.Visible = false
  453. MinIcon.Text = "+"
  454. else
  455. ContentFrame.Visible = true
  456. NewTween(MainFrame, 0.25, { Size = UDim2.fromOffset(240, 180) }):Play()
  457. MinIcon.Text = "—"
  458. end
  459. end)
  460.  
  461. LocalPlayer.CharacterAdded:Connect(function()
  462. task.wait(0.7)
  463. local char = LocalPlayer.Character
  464. if not char then return end
  465. local hum = char:FindFirstChildWhichIsA("Humanoid")
  466. if hum then hum.PlatformStand = false end
  467. if char:FindFirstChild("Animate") then
  468. char.Animate.Disabled = false
  469. end
  470. nowe = false
  471. SetFlyStatus(false)
  472. end)
  473.  
  474. NewTween(MainFrame, 0.35, { BackgroundTransparency = 0 }):Play()
  475.  
  476.  
Advertisement
Add Comment
Please, Sign In to add comment