
KeylessUniversal

-- Modern Mobile Fly GUI (Minimize FIXED)
local player = game.Players.LocalPlayer
local char = player.Character or player.CharacterAdded:Wait()
local humanoid = char:WaitForChild("Humanoid")
local root = char:WaitForChild("HumanoidRootPart")
local RunService = game:GetService("RunService")
local UIS = game:GetService("UserInputService")
local flying = false
local speed = 60
-- GUI
local gui = Instance.new("ScreenGui", player.PlayerGui)
gui.ResetOnSpawn = false
local frame = Instance.new("Frame", gui)
frame.Size = UDim2.new(0,260,0,170)
frame.Position = UDim2.new(0.05,0,0.3,0)
frame.BackgroundColor3 = Color3.fromRGB(35,35,40)
Instance.new("UICorner",frame).CornerRadius = UDim.new(0,12)
-- TOP BAR
local top = Instance.new("Frame", frame)
top.Size = UDim2.new(1,0,0,35)
top.BackgroundColor3 = Color3.fromRGB(45,45,55)
Instance.new("UICorner",top).CornerRadius = UDim.new(0,12)
local title = Instance.new("TextLabel", top)
title.Size = UDim2.new(1,-70,1,0)
title.Position = UDim2.new(0,10,0,0)
title.Text = "Fly Controller"
title.BackgroundTransparency = 1
title.TextColor3 = Color3.new(1,1,1)
title.Font = Enum.Font.GothamBold
title.TextSize = 16
title.TextXAlignment = Enum.TextXAlignment.Left
-- MINIMIZE
local minimize = Instance.new("TextButton", top)
minimize.Size = UDim2.new(0,25,0,25)
minimize.Position = UDim2.new(1,-60,0.5,-12)
minimize.Text = "-"
minimize.Font = Enum.Font.GothamBold
minimize.TextSize = 18
minimize.TextColor3 = Color3.new(1,1,1)
minimize.BackgroundColor3 = Color3.fromRGB(255,170,0)
Instance.new("UICorner",minimize).CornerRadius = UDim.new(1,0)
-- CLOSE
local close = Instance.new("TextButton", top)
close.Size = UDim2.new(0,25,0,25)
close.Position = UDim2.new(1,-30,0.5,-12)
close.Text = "X"
close.Font = Enum.Font.GothamBold
close.TextSize = 14
close.TextColor3 = Color3.new(1,1,1)
close.BackgroundColor3 = Color3.fromRGB(220,60,60)
Instance.new("UICorner",close).CornerRadius = UDim.new(1,0)
-- CONTENT CONTAINER
local content = Instance.new("Frame", frame)
content.Size = UDim2.new(1,0,1,-35)
content.Position = UDim2.new(0,0,0,35)
content.BackgroundTransparency = 1
-- FLY BUTTON
local flyButton = Instance.new("TextButton", content)
flyButton.Size = UDim2.new(1,-20,0,40)
flyButton.Position = UDim2.new(0,10,0,15)
flyButton.Text = "Fly OFF"
flyButton.Font = Enum.Font.GothamBold
flyButton.TextSize = 16
flyButton.TextColor3 = Color3.new(1,1,1)
flyButton.BackgroundColor3 = Color3.fromRGB(200,60,60)
Instance.new("UICorner",flyButton).CornerRadius = UDim.new(0,8)
-- SLIDER
local slider = Instance.new("Frame", content)
slider.Size = UDim2.new(1,-20,0,18)
slider.Position = UDim2.new(0,10,0,80)
slider.BackgroundColor3 = Color3.fromRGB(60,60,70)
Instance.new("UICorner",slider).CornerRadius = UDim.new(1,0)
local knob = Instance.new("Frame", slider)
knob.Size = UDim2.new(0,16,1,0)
knob.BackgroundColor3 = Color3.fromRGB(0,170,255)
Instance.new("UICorner",knob).CornerRadius = UDim.new(1,0)
local speedLabel = Instance.new("TextLabel", content)
speedLabel.Size = UDim2.new(1,0,0,20)
speedLabel.Position = UDim2.new(0,0,0,105)
speedLabel.BackgroundTransparency = 1
speedLabel.Text = "Speed: 60"
speedLabel.Font = Enum.Font.Gotham
speedLabel.TextSize = 14
speedLabel.TextColor3 = Color3.fromRGB(200,200,200)
-- FLY PHYSICS
local bv
local bg
local conn
local function startFly()
flying = true
humanoid:ChangeState(Enum.HumanoidStateType.Physics)
bv = Instance.new("BodyVelocity", root)
bv.MaxForce = Vector3.new(9e9,9e9,9e9)
bv.Velocity = Vector3.new(0,50,0)
bg = Instance.new("BodyGyro", root)
bg.MaxTorque = Vector3.new(9e9,9e9,9e9)
bg.P = 1000
conn = RunService.RenderStepped:Connect(function()
if flying then
local cam = workspace.CurrentCamera
bg.CFrame = cam.CFrame
local move = humanoid.MoveDirection
bv.Velocity = cam.CFrame.LookVector * move.Magnitude * speed
end
end)
end
local function stopFly()
flying = false
humanoid:ChangeState(Enum.HumanoidStateType.GettingUp)
if conn then conn:Disconnect() end
if bv then bv:Destroy() end
if bg then bg:Destroy() end
end
flyButton.MouseButton1Click:Connect(function()
if flying then
stopFly()
flyButton.Text = "Fly OFF"
flyButton.BackgroundColor3 = Color3.fromRGB(200,60,60)
else
startFly()
flyButton.Text = "Fly ON"
flyButton.BackgroundColor3 = Color3.fromRGB(60,200,120)
end
end)
-- MINIMIZE FIX
local minimized = false
minimize.MouseButton1Click:Connect(function()
minimized = not minimized
content.Visible = not minimized
if minimized then
frame.Size = UDim2.new(0,260,0,35)
else
frame.Size = UDim2.new(0,260,0,170)
end
end)
-- CLOSE
close.MouseButton1Click:Connect(function()
gui:Destroy()
end)
-- SLIDER
local dragging = false
knob.InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.Touch then
dragging = true
end
end)
UIS.InputEnded:Connect(function(input)
if input.UserInputType == Enum.UserInputType.Touch then
dragging = false
end
end)
UIS.InputChanged:Connect(function(input)
if dragging and input.UserInputType == Enum.UserInputType.Touch then
local pos = math.clamp(
(input.Position.X - slider.AbsolutePosition.X) / slider.AbsoluteSize.X,
0,1
)
knob.Position = UDim2.new(pos,-8,0,0)
speed = math.floor(20 + (pos * 200))
speedLabel.Text = "Speed: "..speed
end
end)
-- DRAGGABLE
local draggingUI = false
local dragInput
local dragStart
local startPos
local function update(input)
local delta = input.Position - dragStart
frame.Position = UDim2.new(
startPos.X.Scale,
startPos.X.Offset + delta.X,
startPos.Y.Scale,
startPos.Y.Offset + delta.Y
)
end
top.InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.Touch or input.UserInputType == Enum.UserInputType.MouseButton1 then
draggingUI = true
dragStart = input.Position
startPos = frame.Position
input.Changed:Connect(function()
if input.UserInputState == Enum.UserInputState.End then
draggingUI = false
end
end)
end
end)
top.InputChanged:Connect(function(input)
if input.UserInputType == Enum.UserInputType.Touch or input.UserInputType == Enum.UserInputType.MouseMovement then
dragInput = input
end
end)
UIS.InputChanged:Connect(function(input)
if input == dragInput and draggingUI then
update(input)
end
end)-- Modern Mobile Fly GUI (Minimize FIXED)
local player = game.Players.LocalPlayer
local char = player.Character or player.CharacterAdded:Wait()
local humanoid = char:WaitForChild("Humanoid")
local root = char:WaitForChild("HumanoidRootPart")
local RunService = game:GetService("RunService")
local UIS = game:GetService("UserInputService")
local flying = false
local speed = 60
-- GUI
local gui = Instance.new("ScreenGui", player.PlayerGui)
gui.ResetOnSpawn = false
local frame = Instance.new("Frame", gui)
frame.Size = UDim2.new(0,260,0,170)
frame.Position = UDim2.new(0.05,0,0.3,0)
frame.BackgroundColor3 = Color3.fromRGB(35,35,40)
Instance.new("UICorner",frame).CornerRadius = UDim.new(0,12)
-- TOP BAR
local top = Instance.new("Frame", frame)
top.Size = UDim2.new(1,0,0,35)
top.BackgroundColor3 = Color3.fromRGB(45,45,55)
Instance.new("UICorner",top).CornerRadius = UDim.new(0,12)
local title = Instance.new("TextLabel", top)
title.Size = UDim2.new(1,-70,1,0)
title.Position = UDim2.new(0,10,0,0)
title.Text = "Fly Controller"
title.BackgroundTransparency = 1
title.TextColor3 = Color3.new(1,1,1)
title.Font = Enum.Font.GothamBold
title.TextSize = 16
title.TextXAlignment = Enum.TextXAlignment.Left
-- MINIMIZE
local minimize = Instance.new("TextButton", top)
minimize.Size = UDim2.new(0,25,0,25)
minimize.Position = UDim2.new(1,-60,0.5,-12)
minimize.Text = "-"
minimize.Font = Enum.Font.GothamBold
minimize.TextSize = 18
minimize.TextColor3 = Color3.new(1,1,1)
minimize.BackgroundColor3 = Color3.fromRGB(255,170,0)
Instance.new("UICorner",minimize).CornerRadius = UDim.new(1,0)
-- CLOSE
local close = Instance.new("TextButton", top)
close.Size = UDim2.new(0,25,0,25)
close.Position = UDim2.new(1,-30,0.5,-12)
close.Text = "X"
close.Font = Enum.Font.GothamBold
close.TextSize = 14
close.TextColor3 = Color3.new(1,1,1)
close.BackgroundColor3 = Color3.fromRGB(220,60,60)
Instance.new("UICorner",close).CornerRadius = UDim.new(1,0)
-- CONTENT CONTAINER
local content = Instance.new("Frame", frame)
content.Size = UDim2.new(1,0,1,-35)
content.Position = UDim2.new(0,0,0,35)
content.BackgroundTransparency = 1
-- FLY BUTTON
local flyButton = Instance.new("TextButton", content)
flyButton.Size = UDim2.new(1,-20,0,40)
flyButton.Position = UDim2.new(0,10,0,15)
flyButton.Text = "Fly OFF"
flyButton.Font = Enum.Font.GothamBold
flyButton.TextSize = 16
flyButton.TextColor3 = Color3.new(1,1,1)
flyButton.BackgroundColor3 = Color3.fromRGB(200,60,60)
Instance.new("UICorner",flyButton).CornerRadius = UDim.new(0,8)
-- SLIDER
local slider = Instance.new("Frame", content)
slider.Size = UDim2.new(1,-20,0,18)
slider.Position = UDim2.new(0,10,0,80)
slider.BackgroundColor3 = Color3.fromRGB(60,60,70)
Instance.new("UICorner",slider).CornerRadius = UDim.new(1,0)
local knob = Instance.new("Frame", slider)
knob.Size = UDim2.new(0,16,1,0)
knob.BackgroundColor3 = Color3.fromRGB(0,170,255)
Instance.new("UICorner",knob).CornerRadius = UDim.new(1,0)
local speedLabel = Instance.new("TextLabel", content)
speedLabel.Size = UDim2.new(1,0,0,20)
speedLabel.Position = UDim2.new(0,0,0,105)
speedLabel.BackgroundTransparency = 1
speedLabel.Text = "Speed: 60"
speedLabel.Font = Enum.Font.Gotham
speedLabel.TextSize = 14
speedLabel.TextColor3 = Color3.fromRGB(200,200,200)
-- FLY PHYSICS
local bv
local bg
local conn
local function startFly()
flying = true
humanoid:ChangeState(Enum.HumanoidStateType.Physics)
bv = Instance.new("BodyVelocity", root)
bv.MaxForce = Vector3.new(9e9,9e9,9e9)
bv.Velocity = Vector3.new(0,50,0)
bg = Instance.new("BodyGyro", root)
bg.MaxTorque = Vector3.new(9e9,9e9,9e9)
bg.P = 1000
conn = RunService.RenderStepped:Connect(function()
if flying then
local cam = workspace.CurrentCamera
bg.CFrame = cam.CFrame
local move = humanoid.MoveDirection
bv.Velocity = cam.CFrame.LookVector * move.Magnitude * speed
end
end)
end
local function stopFly()
flying = false
humanoid:ChangeState(Enum.HumanoidStateType.GettingUp)
if conn then conn:Disconnect() end
if bv then bv:Destroy() end
if bg then bg:Destroy() end
end
flyButton.MouseButton1Click:Connect(function()
if flying then
stopFly()
flyButton.Text = "Fly OFF"
flyButton.BackgroundColor3 = Color3.fromRGB(200,60,60)
else
startFly()
flyButton.Text = "Fly ON"
flyButton.BackgroundColor3 = Color3.fromRGB(60,200,120)
end
end)
-- MINIMIZE FIX
local minimized = false
minimize.MouseButton1Click:Connect(function()
minimized = not minimized
content.Visible = not minimized
if minimized then
frame.Size = UDim2.new(0,260,0,35)
else
frame.Size = UDim2.new(0,260,0,170)
end
end)
-- CLOSE
close.MouseButton1Click:Connect(function()
gui:Destroy()
end)
-- SLIDER
local dragging = false
knob.InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.Touch then
dragging = true
end
end)
UIS.InputEnded:Connect(function(input)
if input.UserInputType == Enum.UserInputType.Touch then
dragging = false
end
end)
UIS.InputChanged:Connect(function(input)
if dragging and input.UserInputType == Enum.UserInputType.Touch then
local pos = math.clamp(
(input.Position.X - slider.AbsolutePosition.X) / slider.AbsoluteSize.X,
0,1
)
knob.Position = UDim2.new(pos,-8,0,0)
speed = math.floor(20 + (pos * 200))
speedLabel.Text = "Speed: "..speed
end
end)
-- DRAGGABLE
local draggingUI = false
local dragInput
local dragStart
local startPos
local function update(input)
local delta = input.Position - dragStart
frame.Position = UDim2.new(
startPos.X.Scale,
startPos.X.Offset + delta.X,
startPos.Y.Scale,
startPos.Y.Offset + delta.Y
)
end
top.InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.Touch or input.UserInputType == Enum.UserInputType.MouseButton1 then
draggingUI = true
dragStart = input.Position
startPos = frame.Position
input.Changed:Connect(function()
if input.UserInputState == Enum.UserInputState.End then
draggingUI = false
end
end)
end
end)
top.InputChanged:Connect(function(input)
if input.UserInputType == Enum.UserInputType.Touch or input.UserInputType == Enum.UserInputType.MouseMovement then
dragInput = input
end
end)
UIS.InputChanged:Connect(function(input)
if input == dragInput and draggingUI then
update(input)
end
end)No comments yet for this script.



