Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- 🚀 MODERN FLY GUI V3 (2026 Edition)
- -- 100% SAME flying mechanics as your original (R6/R15 support, tpwalking, speed system, up/down hold, etc.)
- -- ✅ Modern dark/neon theme | UICorner + UIStroke everywhere | Smooth Tween animations | PC + Mobile drag
- -- ✅ Minimize with slide animation | Hover effects | Toggle color change | Better layout
- local TweenService = game:GetService("TweenService")
- local UserInputService = game:GetService("UserInputService")
- local RunService = game:GetService("RunService")
- local StarterGui = game:GetService("StarterGui")
- local Players = game:GetService("Players")
- local player = Players.LocalPlayer
- local playerGui = player:WaitForChild("PlayerGui")
- -- ==================== CREATE GUI ====================
- local screenGui = Instance.new("ScreenGui")
- screenGui.Name = "ModernFlyGuiV3"
- screenGui.ResetOnSpawn = false
- screenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
- screenGui.Parent = playerGui
- local mainFrame = Instance.new("Frame")
- mainFrame.Name = "MainFrame"
- mainFrame.Parent = screenGui
- mainFrame.BackgroundColor3 = Color3.fromRGB(18, 18, 28)
- mainFrame.BorderSizePixel = 0
- mainFrame.Position = UDim2.new(0.1, 0, 0.35, 0)
- mainFrame.Size = UDim2.new(0, 250, 0, 190)
- mainFrame.Active = true
- local mainCorner = Instance.new("UICorner")
- mainCorner.CornerRadius = UDim.new(0, 16)
- mainCorner.Parent = mainFrame
- local mainStroke = Instance.new("UIStroke")
- mainStroke.Thickness = 2.5
- mainStroke.Color = Color3.fromRGB(0, 255, 200)
- mainStroke.Parent = mainFrame
- -- Title Bar (draggable area)
- local titleBar = Instance.new("Frame")
- titleBar.Name = "TitleBar"
- titleBar.Parent = mainFrame
- titleBar.BackgroundColor3 = Color3.fromRGB(12, 12, 22)
- titleBar.BorderSizePixel = 0
- titleBar.Size = UDim2.new(1, 0, 0, 38)
- local titleCorner = Instance.new("UICorner")
- titleCorner.CornerRadius = UDim.new(0, 16)
- titleCorner.Parent = titleBar
- local titleLabel = Instance.new("TextLabel")
- titleLabel.Name = "Title"
- titleLabel.Parent = titleBar
- titleLabel.BackgroundTransparency = 1
- titleLabel.Position = UDim2.new(0, 15, 0.5, -10)
- titleLabel.Size = UDim2.new(0.55, 0, 1, -10)
- titleLabel.Font = Enum.Font.GothamBold
- titleLabel.Text = "FLY GUI V3"
- titleLabel.TextColor3 = Color3.fromRGB(0, 255, 200)
- titleLabel.TextScaled = true
- titleLabel.TextXAlignment = Enum.TextXAlignment.Left
- -- Close Button
- local closeButton = Instance.new("TextButton")
- closeButton.Name = "Close"
- closeButton.Parent = titleBar
- closeButton.BackgroundColor3 = Color3.fromRGB(255, 60, 60)
- closeButton.Position = UDim2.new(1, -38, 0.5, -13)
- closeButton.Size = UDim2.new(0, 28, 0, 28)
- closeButton.Font = Enum.Font.GothamBold
- closeButton.Text = "✕"
- closeButton.TextColor3 = Color3.fromRGB(255, 255, 255)
- closeButton.TextSize = 18
- local closeCorner = Instance.new("UICorner")
- closeCorner.CornerRadius = UDim.new(0, 8)
- closeCorner.Parent = closeButton
- -- Minimize Button
- local miniButton = Instance.new("TextButton")
- miniButton.Name = "Minimize"
- miniButton.Parent = titleBar
- miniButton.BackgroundColor3 = Color3.fromRGB(70, 70, 255)
- miniButton.Position = UDim2.new(1, -73, 0.5, -13)
- miniButton.Size = UDim2.new(0, 28, 0, 28)
- miniButton.Font = Enum.Font.GothamBold
- miniButton.Text = "−"
- miniButton.TextColor3 = Color3.fromRGB(255, 255, 255)
- miniButton.TextSize = 22
- local miniCorner = Instance.new("UICorner")
- miniCorner.CornerRadius = UDim.new(0, 8)
- miniCorner.Parent = miniButton
- -- Maximize Button (hidden at start)
- local mini2Button = Instance.new("TextButton")
- mini2Button.Name = "Maximize"
- mini2Button.Parent = titleBar
- mini2Button.BackgroundColor3 = Color3.fromRGB(70, 70, 255)
- mini2Button.Position = UDim2.new(1, -73, 0.5, -13)
- mini2Button.Size = UDim2.new(0, 28, 0, 28)
- mini2Button.Font = Enum.Font.GothamBold
- mini2Button.Text = "+"
- mini2Button.TextColor3 = Color3.fromRGB(255, 255, 255)
- mini2Button.TextSize = 20
- mini2Button.Visible = false
- local mini2Corner = Instance.new("UICorner")
- mini2Corner.CornerRadius = UDim.new(0, 8)
- mini2Corner.Parent = mini2Button
- -- Content Area
- local content = Instance.new("Frame")
- content.Name = "Content"
- content.Parent = mainFrame
- content.BackgroundTransparency = 1
- content.Position = UDim2.new(0, 0, 0, 40)
- content.Size = UDim2.new(1, 0, 1, -40)
- -- FLY Toggle
- local onof = Instance.new("TextButton")
- onof.Name = "onof"
- onof.Parent = content
- onof.BackgroundColor3 = Color3.fromRGB(255, 70, 70)
- onof.Position = UDim2.new(0.5, -60, 0.08, 0)
- onof.Size = UDim2.new(0, 120, 0, 45)
- onof.Font = Enum.Font.GothamBold
- onof.Text = "FLY OFF"
- onof.TextColor3 = Color3.fromRGB(255, 255, 255)
- onof.TextSize = 18
- local onofCorner = Instance.new("UICorner")
- onofCorner.CornerRadius = UDim.new(0, 12)
- onofCorner.Parent = onof
- local onofStroke = Instance.new("UIStroke")
- onofStroke.Thickness = 2
- onofStroke.Color = Color3.fromRGB(255, 255, 255)
- onofStroke.Parent = onof
- -- Speed Section
- local speedContainer = Instance.new("Frame")
- speedContainer.Name = "SpeedContainer"
- speedContainer.Parent = content
- speedContainer.BackgroundTransparency = 1
- speedContainer.Position = UDim2.new(0.5, -75, 0.38, 0)
- speedContainer.Size = UDim2.new(0, 150, 0, 38)
- local mine = Instance.new("TextButton")
- mine.Name = "mine"
- mine.Parent = speedContainer
- mine.BackgroundColor3 = Color3.fromRGB(80, 80, 255)
- mine.Size = UDim2.new(0, 38, 0, 38)
- mine.Font = Enum.Font.GothamBold
- mine.Text = "−"
- mine.TextColor3 = Color3.fromRGB(255, 255, 255)
- mine.TextSize = 26
- local mineCorner = Instance.new("UICorner")
- mineCorner.CornerRadius = UDim.new(0, 10)
- mineCorner.Parent = mine
- local speed = Instance.new("TextLabel")
- speed.Name = "speed"
- speed.Parent = speedContainer
- speed.BackgroundColor3 = Color3.fromRGB(30, 30, 45)
- speed.Position = UDim2.new(0, 42, 0, 0)
- speed.Size = UDim2.new(0, 66, 0, 38)
- speed.Font = Enum.Font.GothamBold
- speed.Text = "1"
- speed.TextColor3 = Color3.fromRGB(0, 255, 200)
- speed.TextScaled = true
- local speedCorner = Instance.new("UICorner")
- speedCorner.CornerRadius = UDim.new(0, 10)
- speedCorner.Parent = speed
- local speedStroke = Instance.new("UIStroke")
- speedStroke.Thickness = 1.5
- speedStroke.Color = Color3.fromRGB(0, 255, 200)
- speedStroke.Parent = speed
- local plus = Instance.new("TextButton")
- plus.Name = "plus"
- plus.Parent = speedContainer
- plus.BackgroundColor3 = Color3.fromRGB(80, 80, 255)
- plus.Position = UDim2.new(0, 112, 0, 0)
- plus.Size = UDim2.new(0, 38, 0, 38)
- plus.Font = Enum.Font.GothamBold
- plus.Text = "+"
- plus.TextColor3 = Color3.fromRGB(255, 255, 255)
- plus.TextSize = 26
- local plusCorner = Instance.new("UICorner")
- plusCorner.CornerRadius = UDim.new(0, 10)
- plusCorner.Parent = plus
- -- UP Button
- local up = Instance.new("TextButton")
- up.Name = "up"
- up.Parent = content
- up.BackgroundColor3 = Color3.fromRGB(80, 255, 140)
- up.Position = UDim2.new(0.12, 0, 0.68, 0)
- up.Size = UDim2.new(0, 88, 0, 42)
- up.Font = Enum.Font.GothamBold
- up.Text = "↑ UP"
- up.TextColor3 = Color3.fromRGB(0, 0, 0)
- up.TextSize = 17
- local upCorner = Instance.new("UICorner")
- upCorner.CornerRadius = UDim.new(0, 12)
- upCorner.Parent = up
- -- DOWN Button
- local down = Instance.new("TextButton")
- down.Name = "down"
- down.Parent = content
- down.BackgroundColor3 = Color3.fromRGB(255, 120, 80)
- down.Position = UDim2.new(0.58, 0, 0.68, 0)
- down.Size = UDim2.new(0, 88, 0, 42)
- down.Font = Enum.Font.GothamBold
- down.Text = "↓ DOWN"
- down.TextColor3 = Color3.fromRGB(0, 0, 0)
- down.TextSize = 17
- local downCorner = Instance.new("UICorner")
- downCorner.CornerRadius = UDim.new(0, 12)
- downCorner.Parent = down
- -- ==================== NOTIFICATION ====================
- StarterGui:SetCore(
- "SendNotification",
- {
- Title = "FLY GUI V3",
- Text = "Modern Edition Loaded ✓\nMade with ❤️ by Grok",
- Icon = "rbxthumb://type=Asset&id=5107182114&w=150&h=150",
- Duration = 6
- }
- )
- -- ==================== SAME VARIABLES & LOGIC ====================
- local speeds = 1
- local nowe = false
- local tpwalking = false
- local speaker = player
- local function updateSpeedLabel()
- speed.Text = tostring(speeds)
- end
- -- ==================== UNIVERSAL DRAG (PC + MOBILE) ====================
- local function makeDraggable(frameToDrag)
- local dragging = false
- local dragInput
- local dragStart
- local startPos
- local function update(input)
- local delta = input.Position - dragStart
- frameToDrag.Position =
- UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
- end
- frameToDrag.InputBegan:Connect(
- function(input)
- if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
- dragging = true
- dragStart = input.Position
- startPos = frameToDrag.Position
- input.Changed:Connect(
- function()
- if input.UserInputState == Enum.UserInputState.End then
- dragging = false
- end
- end
- )
- end
- end
- )
- frameToDrag.InputChanged:Connect(
- function(input)
- if
- input.UserInputType == Enum.UserInputType.MouseMovement or
- input.UserInputType == Enum.UserInputType.Touch
- then
- dragInput = input
- end
- end
- )
- UserInputService.InputChanged:Connect(
- function(input)
- if input == dragInput and dragging then
- update(input)
- end
- end
- )
- end
- makeDraggable(titleBar) -- Drag only from title bar (feels premium)
- -- ==================== BUTTON ANIMATIONS (Tween) ====================
- local function buttonPress(btn)
- local goal = {
- Size = UDim2.new(
- btn.Size.X.Scale * 0.92,
- btn.Size.X.Offset * 0.92,
- btn.Size.Y.Scale * 0.92,
- btn.Size.Y.Offset * 0.92
- )
- }
- TweenService:Create(btn, TweenInfo.new(0.1, Enum.EasingStyle.Quad), goal):Play()
- task.delay(
- 0.1,
- function()
- TweenService:Create(btn, TweenInfo.new(0.15, Enum.EasingStyle.Quad), {Size = btn.Size}):Play()
- end
- )
- end
- -- ==================== MINIMIZE / MAXIMIZE ANIMATION ====================
- local originalSize = mainFrame.Size
- local minimized = false
- local function minimizeGui()
- minimized = true
- TweenService:Create(
- mainFrame,
- TweenInfo.new(0.35, Enum.EasingStyle.Quint, Enum.EasingDirection.Out),
- {Size = UDim2.new(0, 250, 0, 38)}
- ):Play()
- task.delay(
- 0.2,
- function()
- content.Visible = false
- miniButton.Visible = false
- mini2Button.Visible = true
- end
- )
- end
- local function maximizeGui()
- minimized = false
- content.Visible = true
- miniButton.Visible = true
- mini2Button.Visible = false
- TweenService:Create(
- mainFrame,
- TweenInfo.new(0.35, Enum.EasingStyle.Quint, Enum.EasingDirection.Out),
- {Size = originalSize}
- ):Play()
- end
- -- ==================== SAME FLY LOGIC (EXACTLY YOUR ORIGINAL CODE) ====================
- local tis, dis
- onof.MouseButton1Click:Connect(
- function()
- buttonPress(onof)
- if nowe == true then
- nowe = false
- onof.Text = "FLY OFF"
- onof.BackgroundColor3 = Color3.fromRGB(255, 70, 70)
- speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Climbing, true)
- speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.FallingDown, true)
- speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Flying, true)
- speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Freefall, true)
- speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.GettingUp, true)
- speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Jumping, true)
- speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Landed, true)
- speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Physics, true)
- speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.PlatformStanding, true)
- speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Ragdoll, true)
- speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Running, true)
- speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.RunningNoPhysics, true)
- speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Seated, true)
- speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.StrafingNoPhysics, true)
- speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Swimming, true)
- speaker.Character.Humanoid:ChangeState(Enum.HumanoidStateType.RunningNoPhysics)
- tpwalking = false
- else
- nowe = true
- onof.Text = "FLY ON"
- onof.BackgroundColor3 = Color3.fromRGB(80, 255, 80)
- for i = 1, speeds do
- spawn(
- function()
- local hb = RunService.Heartbeat
- tpwalking = true
- local chr = player.Character
- local hum = chr and chr:FindFirstChildWhichIsA("Humanoid")
- while tpwalking and hb:Wait() and chr and hum and hum.Parent do
- if hum.MoveDirection.Magnitude > 0 then
- chr:TranslateBy(hum.MoveDirection)
- end
- end
- end
- )
- end
- player.Character.Animate.Disabled = true
- local Char = player.Character
- local Hum = Char:FindFirstChildOfClass("Humanoid") or Char:FindFirstChildOfClass("AnimationController")
- for i, v in next, Hum:GetPlayingAnimationTracks() do
- v:AdjustSpeed(0)
- end
- speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Climbing, false)
- speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.FallingDown, false)
- speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Flying, false)
- speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Freefall, false)
- speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.GettingUp, false)
- speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Jumping, false)
- speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Landed, false)
- speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Physics, false)
- speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.PlatformStanding, false)
- speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Ragdoll, false)
- speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Running, false)
- speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.RunningNoPhysics, false)
- speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Seated, false)
- speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.StrafingNoPhysics, false)
- speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Swimming, false)
- speaker.Character.Humanoid:ChangeState(Enum.HumanoidStateType.Swimming)
- -- R6 / R15 flying code (EXACTLY your original)
- if player.Character:FindFirstChildOfClass("Humanoid").RigType == Enum.HumanoidRigType.R6 then
- local plr = player
- local torso = plr.Character.Torso
- local bg = Instance.new("BodyGyro", torso)
- bg.P = 9e4
- bg.maxTorque = Vector3.new(9e9, 9e9, 9e9)
- bg.cframe = torso.CFrame
- local bv = Instance.new("BodyVelocity", torso)
- bv.velocity = Vector3.new(0, 0.1, 0)
- bv.maxForce = Vector3.new(9e9, 9e9, 9e9)
- plr.Character.Humanoid.PlatformStand = true
- local ctrl = {f = 0, b = 0, l = 0, r = 0}
- local lastctrl = {f = 0, b = 0, l = 0, r = 0}
- local maxspeed = 50
- local speed = 0
- while nowe == true or plr.Character.Humanoid.Health == 0 do
- RunService.RenderStepped:Wait()
- if ctrl.l + ctrl.r ~= 0 or ctrl.f + ctrl.b ~= 0 then
- speed = speed + .5 + (speed / maxspeed)
- if speed > maxspeed then
- speed = maxspeed
- end
- elseif speed ~= 0 then
- speed = speed - 1
- if speed < 0 then
- speed = 0
- end
- end
- if (ctrl.l + ctrl.r) ~= 0 or (ctrl.f + ctrl.b) ~= 0 then
- bv.velocity =
- ((workspace.CurrentCamera.CoordinateFrame.lookVector * (ctrl.f + ctrl.b)) +
- ((workspace.CurrentCamera.CoordinateFrame *
- CFrame.new(ctrl.l + ctrl.r, (ctrl.f + ctrl.b) * .2, 0).p) -
- workspace.CurrentCamera.CoordinateFrame.p)) *
- speed
- lastctrl = {f = ctrl.f, b = ctrl.b, l = ctrl.l, r = ctrl.r}
- elseif speed ~= 0 then
- bv.velocity =
- ((workspace.CurrentCamera.CoordinateFrame.lookVector * (lastctrl.f + lastctrl.b)) +
- ((workspace.CurrentCamera.CoordinateFrame *
- CFrame.new(lastctrl.l + lastctrl.r, (lastctrl.f + lastctrl.b) * .2, 0).p) -
- workspace.CurrentCamera.CoordinateFrame.p)) *
- speed
- else
- bv.velocity = Vector3.new(0, 0, 0)
- end
- bg.cframe =
- workspace.CurrentCamera.CoordinateFrame *
- CFrame.Angles(-math.rad((ctrl.f + ctrl.b) * 50 * speed / maxspeed), 0, 0)
- end
- bg:Destroy()
- bv:Destroy()
- plr.Character.Humanoid.PlatformStand = false
- tpwalking = false
- else
- -- R15 part (identical to your original)
- local plr = player
- local UpperTorso = plr.Character.UpperTorso
- local bg = Instance.new("BodyGyro", UpperTorso)
- bg.P = 9e4
- bg.maxTorque = Vector3.new(9e9, 9e9, 9e9)
- bg.cframe = UpperTorso.CFrame
- local bv = Instance.new("BodyVelocity", UpperTorso)
- bv.velocity = Vector3.new(0, 0.1, 0)
- bv.maxForce = Vector3.new(9e9, 9e9, 9e9)
- plr.Character.Humanoid.PlatformStand = true
- local ctrl = {f = 0, b = 0, l = 0, r = 0}
- local lastctrl = {f = 0, b = 0, l = 0, r = 0}
- local maxspeed = 50
- local speed = 0
- while nowe == true or plr.Character.Humanoid.Health == 0 do
- wait()
- if ctrl.l + ctrl.r ~= 0 or ctrl.f + ctrl.b ~= 0 then
- speed = speed + .5 + (speed / maxspeed)
- if speed > maxspeed then
- speed = maxspeed
- end
- elseif speed ~= 0 then
- speed = speed - 1
- if speed < 0 then
- speed = 0
- end
- end
- if (ctrl.l + ctrl.r) ~= 0 or (ctrl.f + ctrl.b) ~= 0 then
- bv.velocity =
- ((workspace.CurrentCamera.CoordinateFrame.lookVector * (ctrl.f + ctrl.b)) +
- ((workspace.CurrentCamera.CoordinateFrame *
- CFrame.new(ctrl.l + ctrl.r, (ctrl.f + ctrl.b) * .2, 0).p) -
- workspace.CurrentCamera.CoordinateFrame.p)) *
- speed
- lastctrl = {f = ctrl.f, b = ctrl.b, l = ctrl.l, r = ctrl.r}
- elseif speed ~= 0 then
- bv.velocity =
- ((workspace.CurrentCamera.CoordinateFrame.lookVector * (lastctrl.f + lastctrl.b)) +
- ((workspace.CurrentCamera.CoordinateFrame *
- CFrame.new(lastctrl.l + lastctrl.r, (lastctrl.f + lastctrl.b) * .2, 0).p) -
- workspace.CurrentCamera.CoordinateFrame.p)) *
- speed
- else
- bv.velocity = Vector3.new(0, 0, 0)
- end
- bg.cframe =
- workspace.CurrentCamera.CoordinateFrame *
- CFrame.Angles(-math.rad((ctrl.f + ctrl.b) * 50 * speed / maxspeed), 0, 0)
- end
- bg:Destroy()
- bv:Destroy()
- plr.Character.Humanoid.PlatformStand = false
- tpwalking = false
- end
- end
- end
- )
- -- UP / DOWN hold movement (exactly your original logic)
- up.MouseButton1Down:Connect(
- function()
- buttonPress(up)
- tis =
- up.MouseEnter:Connect(
- function()
- while tis do
- RunService.Heartbeat:Wait()
- if player.Character and player.Character:FindFirstChild("HumanoidRootPart") then
- player.Character.HumanoidRootPart.CFrame =
- player.Character.HumanoidRootPart.CFrame * CFrame.new(0, 1, 0)
- end
- end
- end
- )
- end
- )
- up.MouseLeave:Connect(
- function()
- if tis then
- tis:Disconnect()
- tis = nil
- end
- end
- )
- down.MouseButton1Down:Connect(
- function()
- buttonPress(down)
- dis =
- down.MouseEnter:Connect(
- function()
- while dis do
- RunService.Heartbeat:Wait()
- if player.Character and player.Character:FindFirstChild("HumanoidRootPart") then
- player.Character.HumanoidRootPart.CFrame =
- player.Character.HumanoidRootPart.CFrame * CFrame.new(0, -1, 0)
- end
- end
- end
- )
- end
- )
- down.MouseLeave:Connect(
- function()
- if dis then
- dis:Disconnect()
- dis = nil
- end
- end
- )
- -- Speed + / -
- plus.MouseButton1Click:Connect(
- function()
- buttonPress(plus)
- speeds = speeds + 1
- updateSpeedLabel()
- if nowe then
- tpwalking = false
- for i = 1, speeds do
- spawn(
- function()
- local hb = RunService.Heartbeat
- tpwalking = true
- local chr = player.Character
- local hum = chr and chr:FindFirstChildWhichIsA("Humanoid")
- while tpwalking and hb:Wait() and chr and hum and hum.Parent do
- if hum.MoveDirection.Magnitude > 0 then
- chr:TranslateBy(hum.MoveDirection)
- end
- end
- end
- )
- end
- end
- end
- )
- mine.MouseButton1Click:Connect(
- function()
- buttonPress(mine)
- if speeds == 1 then
- speed.Text = "MIN"
- task.delay(
- 0.8,
- function()
- updateSpeedLabel()
- end
- )
- else
- speeds = speeds - 1
- updateSpeedLabel()
- if nowe then
- tpwalking = false
- for i = 1, speeds do
- spawn(
- function()
- local hb = RunService.Heartbeat
- tpwalking = true
- local chr = player.Character
- local hum = chr and chr:FindFirstChildWhichIsA("Humanoid")
- while tpwalking and hb:Wait() and chr and hum and hum.Parent do
- if hum.MoveDirection.Magnitude > 0 then
- chr:TranslateBy(hum.MoveDirection)
- end
- end
- end
- )
- end
- end
- end
- end
- )
- -- Close & Minimize
- closeButton.MouseButton1Click:Connect(
- function()
- buttonPress(closeButton)
- screenGui:Destroy()
- end
- )
- miniButton.MouseButton1Click:Connect(
- function()
- buttonPress(miniButton)
- minimizeGui()
- end
- )
- mini2Button.MouseButton1Click:Connect(
- function()
- buttonPress(mini2Button)
- maximizeGui()
- end
- )
- -- Respawn fix
- player.CharacterAdded:Connect(
- function()
- task.wait(0.7)
- if player.Character and player.Character:FindFirstChild("Humanoid") then
- player.Character.Humanoid.PlatformStand = false
- player.Character.Animate.Disabled = false
- end
- end
- )
Advertisement
Add Comment
Please, Sign In to add comment