
KeylessUniversal

local p = game:GetService("Players").LocalPlayer
local rs = game:GetService("RunService")
local ts = game:GetService("TweenService")
local uis = game:GetService("UserInputService")
if p.PlayerGui:FindFirstChild("FlyGui") then
p.PlayerGui.FlyGui:Destroy()
end
local g = Instance.new("ScreenGui", p.PlayerGui)
g.Name = "FlyGui"
local f = Instance.new("Frame", g)
f.Size = UDim2.new(0, 190, 0, 120)
f.Position = UDim2.new(0.8, -95, 0.6, 0)
f.BackgroundColor3 = Color3.fromRGB(35, 35, 35)
f.BorderSizePixel = 0
f.Active = true
local top = Instance.new("Frame", f)
top.Size = UDim2.new(1, 0, 0, 26)
top.BorderSizePixel = 0
local t = Instance.new("TextLabel", top)
t.Size = UDim2.new(1, 0, 1, 0)
t.Text = "Fly"
t.BackgroundTransparency = 1
t.Font = Enum.Font.GothamBold
t.TextSize = 14
t.TextColor3 = Color3.new(1, 1, 1)
t.TextXAlignment = Enum.TextXAlignment.Center
local x = Instance.new("TextButton", top)
x.Size = UDim2.new(0, 26, 1, 0)
x.Position = UDim2.new(1, -26, 0, 0)
x.Text = "X"
x.Font = Enum.Font.GothamBold
x.TextSize = 14
x.TextColor3 = Color3.new(1, 1, 1)
x.BackgroundTransparency = 1
x.BorderSizePixel = 0
task.spawn(function()
local h = 0
while g.Parent do
h += 0.005
if h > 1 then h = 0 end
top.BackgroundColor3 = Color3.fromHSV(h, 1, 1)
task.wait()
end
end)
local dragging = false
local dragStart, startPos
top.InputBegan:Connect(function(i)
if i.UserInputType == Enum.UserInputType.MouseButton1 or i.UserInputType == Enum.UserInputType.Touch then
dragging = true
dragStart = i.Position
startPos = f.Position
i.Changed:Connect(function()
if i.UserInputState == Enum.UserInputState.End then
dragging = false
end
end)
end
end)
uis.InputChanged:Connect(function(i)
if dragging and (i.UserInputType == Enum.UserInputType.MouseMovement or i.UserInputType == Enum.UserInputType.Touch) then
local d = i.Position - dragStart
f.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + d.X, startPos.Y.Scale, startPos.Y.Offset + d.Y)
end
end)
local c = Instance.new("Frame", f)
c.Size = UDim2.new(1, 0, 1, -26)
c.Position = UDim2.new(0, 0, 0, 26)
c.BackgroundTransparency = 1
local layout = Instance.new("UIListLayout", c)
layout.Padding = UDim.new(0, 6)
layout.HorizontalAlignment = Enum.HorizontalAlignment.Center
layout.VerticalAlignment = Enum.VerticalAlignment.Center
local function s(o)
o.BackgroundColor3 = Color3.fromRGB(55, 55, 55)
o.TextColor3 = Color3.new(1, 1, 1)
o.Font = Enum.Font.Gotham
o.TextSize = 13
o.BorderSizePixel = 0
end
local row = Instance.new("Frame", c)
row.Size = UDim2.new(1, 0, 0, 32)
row.BackgroundTransparency = 1
local rl = Instance.new("UIListLayout", row)
rl.FillDirection = Enum.FillDirection.Horizontal
rl.HorizontalAlignment = Enum.HorizontalAlignment.Center
rl.Padding = UDim.new(0, 5)
local box = Instance.new("TextBox", row)
box.Size = UDim2.new(0, 50, 1, 0)
box.Text = "0"
s(box)
local r = Instance.new("TextButton", row)
r.Size = UDim2.new(0, 30, 1, 0)
r.Text = "R"
s(r)
local m = Instance.new("TextButton", row)
m.Size = UDim2.new(0, 30, 1, 0)
s(m)
local pbtn = Instance.new("TextButton", row)
pbtn.Size = UDim2.new(0, 30, 1, 0)
s(pbtn)
local cb = Instance.new("TextButton", c)
cb.Size = UDim2.new(0, 145, 0, 26)
cb.Text = "C"
s(cb)
local crow = Instance.new("Frame", c)
crow.Size = UDim2.new(1, 0, 0, 0)
crow.ClipsDescendants = true
crow.BackgroundTransparency = 1
local cl = Instance.new("UIListLayout", crow)
cl.FillDirection = Enum.FillDirection.Horizontal
cl.HorizontalAlignment = Enum.HorizontalAlignment.Center
cl.Padding = UDim.new(0, 5)
local cbox = Instance.new("TextBox", crow)
cbox.Size = UDim2.new(0, 50, 1, 0)
cbox.Text = "10"
s(cbox)
local cr = Instance.new("TextButton", crow)
cr.Size = UDim2.new(0, 30, 1, 0)
cr.Text = "R"
s(cr)
-- Flying logic
local flying = false
local speed = 0
local step = 10
local open = false
local bv, bg, con
local function char() return p.Character or p.CharacterAdded:Wait() end
local function hum() return char():WaitForChild("Humanoid") end
local function root() return char():WaitForChild("HumanoidRootPart") end
local function stop()
flying = false
if con then con:Disconnect() end
if bv then bv:Destroy() end
if bg then bg:Destroy() end
hum().PlatformStand = false
end
local function start()
local rt = root()
local h = hum()
flying = true
h.PlatformStand = true
bv = Instance.new("BodyVelocity", rt)
bv.MaxForce = Vector3.new(9e9, 9e9, 9e9)
bg = Instance.new("BodyGyro", rt)
bg.MaxTorque = Vector3.new(9e9, 9e9, 9e9)
bg.P = 1e4
local cam = workspace.CurrentCamera
local ctrl = require(p.PlayerScripts.PlayerModule.ControlModule)
con = rs.Heartbeat:Connect(function()
if not flying then return end
local mv = ctrl:GetMoveVector()
local target = Vector3.zero
if mv.Magnitude > 0 and speed > 0 then
local dir = cam.CFrame:VectorToWorldSpace(mv)
target = dir.Unit * (speed * 1.2)
end
bv.Velocity = bv.Velocity:Lerp(target, 0.25)
bg.CFrame = CFrame.lookAt(rt.Position, rt.Position + cam.CFrame.LookVector)
end)
end
local function set(v)
speed = math.max(0, math.floor(v))
box.Text = tostring(speed)
if speed == 0 then stop() elseif not flying then start() end
end
local function upd()
m.Text = "-" .. step
pbtn.Text = "+" .. step
end
upd()
pbtn.MouseButton1Click:Connect(function() set(speed + step) end)
m.MouseButton1Click:Connect(function() set(speed - step) end)
r.MouseButton1Click:Connect(function() set(0) end)
cb.MouseButton1Click:Connect(function()
open = not open
ts:Create(f, TweenInfo.new(0.3, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {
Size = UDim2.new(0, 190, 0, open and 160 or 120)
}):Play()
ts:Create(crow, TweenInfo.new(0.3, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {
Size = UDim2.new(1, 0, 0, open and 26 or 0)
}):Play()
end)
cbox.FocusLost:Connect(function()
local n = tonumber(cbox.Text)
if n and n > 0 then step = math.floor(n) upd()
else cbox.Text = tostring(step) end
end)
cr.MouseButton1Click:Connect(function()
step = 10
cbox.Text = "10"
upd()
end)
box.FocusLost:Connect(function()
local n = tonumber(box.Text)
if n then set(n) end
end)
x.MouseButton1Click:Connect(function()
stop()
set(0)
g:Destroy()
end)
p.CharacterAdded:Connect(function()
rs.Heartbeat:Wait()
set(speed)
end) local p = game:GetService("Players").LocalPlayer
local rs = game:GetService("RunService")
local ts = game:GetService("TweenService")
local uis = game:GetService("UserInputService")
if p.PlayerGui:FindFirstChild("FlyGui") then
p.PlayerGui.FlyGui:Destroy()
end
local g = Instance.new("ScreenGui", p.PlayerGui)
g.Name = "FlyGui"
local f = Instance.new("Frame", g)
f.Size = UDim2.new(0, 190, 0, 120)
f.Position = UDim2.new(0.8, -95, 0.6, 0)
f.BackgroundColor3 = Color3.fromRGB(35, 35, 35)
f.BorderSizePixel = 0
f.Active = true
local top = Instance.new("Frame", f)
top.Size = UDim2.new(1, 0, 0, 26)
top.BorderSizePixel = 0
local t = Instance.new("TextLabel", top)
t.Size = UDim2.new(1, 0, 1, 0)
t.Text = "Fly"
t.BackgroundTransparency = 1
t.Font = Enum.Font.GothamBold
t.TextSize = 14
t.TextColor3 = Color3.new(1, 1, 1)
t.TextXAlignment = Enum.TextXAlignment.Center
local x = Instance.new("TextButton", top)
x.Size = UDim2.new(0, 26, 1, 0)
x.Position = UDim2.new(1, -26, 0, 0)
x.Text = "X"
x.Font = Enum.Font.GothamBold
x.TextSize = 14
x.TextColor3 = Color3.new(1, 1, 1)
x.BackgroundTransparency = 1
x.BorderSizePixel = 0
task.spawn(function()
local h = 0
while g.Parent do
h += 0.005
if h > 1 then h = 0 end
top.BackgroundColor3 = Color3.fromHSV(h, 1, 1)
task.wait()
end
end)
local dragging = false
local dragStart, startPos
top.InputBegan:Connect(function(i)
if i.UserInputType == Enum.UserInputType.MouseButton1 or i.UserInputType == Enum.UserInputType.Touch then
dragging = true
dragStart = i.Position
startPos = f.Position
i.Changed:Connect(function()
if i.UserInputState == Enum.UserInputState.End then
dragging = false
end
end)
end
end)
uis.InputChanged:Connect(function(i)
if dragging and (i.UserInputType == Enum.UserInputType.MouseMovement or i.UserInputType == Enum.UserInputType.Touch) then
local d = i.Position - dragStart
f.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + d.X, startPos.Y.Scale, startPos.Y.Offset + d.Y)
end
end)
local c = Instance.new("Frame", f)
c.Size = UDim2.new(1, 0, 1, -26)
c.Position = UDim2.new(0, 0, 0, 26)
c.BackgroundTransparency = 1
local layout = Instance.new("UIListLayout", c)
layout.Padding = UDim.new(0, 6)
layout.HorizontalAlignment = Enum.HorizontalAlignment.Center
layout.VerticalAlignment = Enum.VerticalAlignment.Center
local function s(o)
o.BackgroundColor3 = Color3.fromRGB(55, 55, 55)
o.TextColor3 = Color3.new(1, 1, 1)
o.Font = Enum.Font.Gotham
o.TextSize = 13
o.BorderSizePixel = 0
end
local row = Instance.new("Frame", c)
row.Size = UDim2.new(1, 0, 0, 32)
row.BackgroundTransparency = 1
local rl = Instance.new("UIListLayout", row)
rl.FillDirection = Enum.FillDirection.Horizontal
rl.HorizontalAlignment = Enum.HorizontalAlignment.Center
rl.Padding = UDim.new(0, 5)
local box = Instance.new("TextBox", row)
box.Size = UDim2.new(0, 50, 1, 0)
box.Text = "0"
s(box)
local r = Instance.new("TextButton", row)
r.Size = UDim2.new(0, 30, 1, 0)
r.Text = "R"
s(r)
local m = Instance.new("TextButton", row)
m.Size = UDim2.new(0, 30, 1, 0)
s(m)
local pbtn = Instance.new("TextButton", row)
pbtn.Size = UDim2.new(0, 30, 1, 0)
s(pbtn)
local cb = Instance.new("TextButton", c)
cb.Size = UDim2.new(0, 145, 0, 26)
cb.Text = "C"
s(cb)
local crow = Instance.new("Frame", c)
crow.Size = UDim2.new(1, 0, 0, 0)
crow.ClipsDescendants = true
crow.BackgroundTransparency = 1
local cl = Instance.new("UIListLayout", crow)
cl.FillDirection = Enum.FillDirection.Horizontal
cl.HorizontalAlignment = Enum.HorizontalAlignment.Center
cl.Padding = UDim.new(0, 5)
local cbox = Instance.new("TextBox", crow)
cbox.Size = UDim2.new(0, 50, 1, 0)
cbox.Text = "10"
s(cbox)
local cr = Instance.new("TextButton", crow)
cr.Size = UDim2.new(0, 30, 1, 0)
cr.Text = "R"
s(cr)
-- Flying logic
local flying = false
local speed = 0
local step = 10
local open = false
local bv, bg, con
local function char() return p.Character or p.CharacterAdded:Wait() end
local function hum() return char():WaitForChild("Humanoid") end
local function root() return char():WaitForChild("HumanoidRootPart") end
local function stop()
flying = false
if con then con:Disconnect() end
if bv then bv:Destroy() end
if bg then bg:Destroy() end
hum().PlatformStand = false
end
local function start()
local rt = root()
local h = hum()
flying = true
h.PlatformStand = true
bv = Instance.new("BodyVelocity", rt)
bv.MaxForce = Vector3.new(9e9, 9e9, 9e9)
bg = Instance.new("BodyGyro", rt)
bg.MaxTorque = Vector3.new(9e9, 9e9, 9e9)
bg.P = 1e4
local cam = workspace.CurrentCamera
local ctrl = require(p.PlayerScripts.PlayerModule.ControlModule)
con = rs.Heartbeat:Connect(function()
if not flying then return end
local mv = ctrl:GetMoveVector()
local target = Vector3.zero
if mv.Magnitude > 0 and speed > 0 then
local dir = cam.CFrame:VectorToWorldSpace(mv)
target = dir.Unit * (speed * 1.2)
end
bv.Velocity = bv.Velocity:Lerp(target, 0.25)
bg.CFrame = CFrame.lookAt(rt.Position, rt.Position + cam.CFrame.LookVector)
end)
end
local function set(v)
speed = math.max(0, math.floor(v))
box.Text = tostring(speed)
if speed == 0 then stop() elseif not flying then start() end
end
local function upd()
m.Text = "-" .. step
pbtn.Text = "+" .. step
end
upd()
pbtn.MouseButton1Click:Connect(function() set(speed + step) end)
m.MouseButton1Click:Connect(function() set(speed - step) end)
r.MouseButton1Click:Connect(function() set(0) end)
cb.MouseButton1Click:Connect(function()
open = not open
ts:Create(f, TweenInfo.new(0.3, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {
Size = UDim2.new(0, 190, 0, open and 160 or 120)
}):Play()
ts:Create(crow, TweenInfo.new(0.3, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {
Size = UDim2.new(1, 0, 0, open and 26 or 0)
}):Play()
end)
cbox.FocusLost:Connect(function()
local n = tonumber(cbox.Text)
if n and n > 0 then step = math.floor(n) upd()
else cbox.Text = tostring(step) end
end)
cr.MouseButton1Click:Connect(function()
step = 10
cbox.Text = "10"
upd()
end)
box.FocusLost:Connect(function()
local n = tonumber(box.Text)
if n then set(n) end
end)
x.MouseButton1Click:Connect(function()
stop()
set(0)
g:Destroy()
end)
p.CharacterAdded:Connect(function()
rs.Heartbeat:Wait()
set(speed)
end)No comments yet for this script.



