
KeylessUniversal

-- SERVICES
local Players = game:GetService("Players")
local UIS = game:GetService("UserInputService")
local RunService = game:GetService("RunService")
local TweenService = game:GetService("TweenService")
local player = Players.LocalPlayer
local char = player.Character or player.CharacterAdded:Wait()
local hrp = char:WaitForChild("HumanoidRootPart")
-- STATES
local flying = false
local magnet = false
local flySpeed = 60
local magnetRadius = 25
-- BODY MOVERS
local bv, bg
-- UI
local gui = Instance.new("ScreenGui", player.PlayerGui)
gui.Name = "ModernFlyUI"
local blur = Instance.new("BlurEffect", game:GetService("Lighting"))
blur.Size = 0
local frame = Instance.new("Frame", gui)
frame.Size = UDim2.fromScale(0.28, 0.32)
frame.Position = UDim2.fromScale(0.36, 0.34)
frame.BackgroundColor3 = Color3.fromRGB(25,25,30)
frame.BorderSizePixel = 0
frame.AnchorPoint = Vector2.new(0.5,0.5)
Instance.new("UICorner", frame).CornerRadius = UDim.new(0,20)
Instance.new("UIStroke", frame).Color = Color3.fromRGB(80,80,120)
local title = Instance.new("TextLabel", frame)
title.Text = "⚡ Fly + Magnet"
title.Size = UDim2.new(1,0,0.18,0)
title.BackgroundTransparency = 1
title.TextColor3 = Color3.new(1,1,1)
title.Font = Enum.Font.GothamBold
title.TextScaled = true
-- BUTTON CREATOR
local function button(text, posY)
local b = Instance.new("TextButton", frame)
b.Size = UDim2.new(0.85,0,0.18,0)
b.Position = UDim2.new(0.075,0,posY,0)
b.BackgroundColor3 = Color3.fromRGB(40,40,60)
b.TextColor3 = Color3.new(1,1,1)
b.Text = text
b.Font = Enum.Font.Gotham
b.TextScaled = true
Instance.new("UICorner", b).CornerRadius = UDim.new(0,14)
return b
end
local flyBtn = button("Fly: OFF", 0.22)
local magBtn = button("Magnet: OFF", 0.44)
-- SLIDERS (simple)
local function slider(labelText, startY, min, max, default, callback)
local lbl = Instance.new("TextLabel", frame)
lbl.Text = labelText..": "..default
lbl.Size = UDim2.new(0.85,0,0.1,0)
lbl.Position = UDim2.new(0.075,0,startY,0)
lbl.BackgroundTransparency = 1
lbl.TextColor3 = Color3.new(1,1,1)
lbl.Font = Enum.Font.Gotham
lbl.TextScaled = true
local bar = Instance.new("Frame", frame)
bar.Size = UDim2.new(0.85,0,0.05,0)
bar.Position = UDim2.new(0.075,0,startY+0.1,0)
bar.BackgroundColor3 = Color3.fromRGB(60,60,80)
Instance.new("UICorner", bar)
local fill = Instance.new("Frame", bar)
fill.Size = UDim2.fromScale((default-min)/(max-min),1)
fill.BackgroundColor3 = Color3.fromRGB(120,120,255)
Instance.new("UICorner", fill)
bar.InputBegan:Connect(function(i)
if i.UserInputType == Enum.UserInputType.MouseButton1 then
local x = (i.Position.X - bar.AbsolutePosition.X) / bar.AbsoluteSize.X
x = math.clamp(x,0,1)
local val = math.floor(min + (max-min)*x)
fill.Size = UDim2.fromScale(x,1)
lbl.Text = labelText..": "..val
callback(val)
end
end)
end
slider("Fly Speed", 0.66, 30, 150, flySpeed, function(v) flySpeed = v end)
slider("Magnet Radius", 0.8, 10, 60, magnetRadius, function(v) magnetRadius = v end)
-- FLY LOGIC
local function startFly()
bv = Instance.new("BodyVelocity", hrp)
bg = Instance.new("BodyGyro", hrp)
bv.MaxForce = Vector3.new(9e9,9e9,9e9)
bg.MaxTorque = Vector3.new(9e9,9e9,9e9)
end
local function stopFly()
if bv then bv:Destroy() end
if bg then bg:Destroy() end
end
RunService.RenderStepped:Connect(function()
if flying and bv and bg then
local cam = workspace.CurrentCamera
bg.CFrame = cam.CFrame
local move = Vector3.zero
if UIS:IsKeyDown(Enum.KeyCode.W) then move += cam.CFrame.LookVector end
if UIS:IsKeyDown(Enum.KeyCode.S) then move -= cam.CFrame.LookVector end
if UIS:IsKeyDown(Enum.KeyCode.A) then move -= cam.CFrame.RightVector end
if UIS:IsKeyDown(Enum.KeyCode.D) then move += cam.CFrame.RightVector end
if UIS:IsKeyDown(Enum.KeyCode.Space) then move += Vector3.yAxis end
if UIS:IsKeyDown(Enum.KeyCode.LeftControl) then move -= Vector3.yAxis end
bv.Velocity = move * flySpeed
end
end)
-- MAGNET LOGIC
RunService.Heartbeat:Connect(function()
if not magnet then return end
for _,p in ipairs(workspace:GetDescendants()) do
if p:IsA("BasePart") and not p.Anchored then
if (p.Position - hrp.Position).Magnitude <= magnetRadius then
p.Velocity = (hrp.Position - p.Position) * 5
end
end
end
end)
-- BUTTON EVENTS
flyBtn.MouseButton1Click:Connect(function()
flying = not flying
flyBtn.Text = flying and "Fly: ON" or "Fly: OFF"
if flying then
startFly()
TweenService:Create(blur, TweenInfo.new(0.3), {Size = 12}):Play()
else
stopFly()
TweenService:Create(blur, TweenInfo.new(0.3), {Size = 0}):Play()
end
end)
magBtn.MouseButton1Click:Connect(function()
magnet = not magnet
magBtn.Text = magnet and "Magnet: ON" or "Magnet: OFF"
end)



pls leave your remarks here
@Pjv1 this * suck it does not work in anything game