local P=game:GetService("Players").LocalPlayer
local U=game:GetService("UserInputService")
local R=game:GetService("RunService")
local T=game:GetService("TweenService")
local W,J,F=16,50,50
local fly,nc=false,false
local c,h,r,bv,bg
local function char(x)
c=x;h=x:WaitForChild("Humanoid");r=x:WaitForChild("HumanoidRootPart")
h.UseJumpPower=true;h.WalkSpeed=W;h.JumpPower=J
end
char(P.Character or P.CharacterAdded:Wait())
P.CharacterAdded:Connect(function(x)
fly=false;nc=false
if bv then bv:Destroy() end
if bg then bg:Destroy() end
char(x)
end)
-- GUI
local g=Instance.new("ScreenGui",P:WaitForChild("PlayerGui"))
g.Name="Control"
g.ResetOnSpawn=false
local m=Instance.new("Frame",g)
m.Size=UDim2.fromOffset(330,360)
m.Position=UDim2.new(.5,-165,.5,-180)
m.BackgroundColor3=Color3.fromRGB(15,18,27)
m.BorderSizePixel=0
Instance.new("UICorner",m).CornerRadius=UDim.new(0,14)
local s=Instance.new("UIStroke",m)
s.Color=Color3.fromRGB(0,180,255)
s.Transparency=.25
local top=Instance.new("Frame",m)
top.Size=UDim2.new(1,0,0,55)
top.BackgroundColor3=Color3.fromRGB(22,26,38)
top.BorderSizePixel=0
Instance.new("UICorner",top).CornerRadius=UDim.new(0,14)
local title=Instance.new("TextLabel",top)
title.Size=UDim2.new(1,-20,1,0)
title.Position=UDim2.fromOffset(10,0)
title.BackgroundTransparency=1
title.Text="⚡ PLAYER CONTROL"
title.TextColor3=Color3.new(1,1,1)
title.TextSize=19
title.Font=Enum.Font.GothamBold
title.TextXAlignment=Enum.TextXAlignment.Left
-- draggable
local drag,ds,sp=false,nil,nil
top.InputBegan:Connect(function(i)
if i.UserInputType==Enum.UserInputType.MouseButton1 then
drag=true;ds=i.Position;sp=m.Position
end
end)
top.InputEnded:Connect(function(i)
if i.UserInputType==Enum.UserInputType.MouseButton1 then drag=false end
end)
U.InputChanged:Connect(function(i)
if drag and i.UserInputType==Enum.UserInputType.MouseMovement then
local d=i.Position-ds
m.Position=UDim2.new(sp.X.Scale,sp.X.Offset+d.X,sp.Y.Scale,sp.Y.Offset+d.Y)
end
end)
-- slider
local function slider(y,name,val,fn)
local l=Instance.new("TextLabel",m)
l.Size=UDim2.new(1,-30,0,24)
l.Position=UDim2.fromOffset(15,y)
l.BackgroundTransparency=1
l.Text=name.." "..val
l.TextColor3=Color3.new(1,1,1)
l.TextSize=14
l.Font=Enum.Font.GothamMedium
l.TextXAlignment=Enum.TextXAlignment.Left
local bar=Instance.new("Frame",m)
bar.Size=UDim2.new(1,-30,0,7)
bar.Position=UDim2.fromOffset(15,y+30)
bar.BackgroundColor3=Color3.fromRGB(50,55,70)
bar.BorderSizePixel=0
Instance.new("UICorner",bar).CornerRadius=UDim.new(1,0)
local fill=Instance.new("Frame",bar)
fill.Size=UDim2.new(val/100,0,1,0)
fill.BackgroundColor3=Color3.fromRGB(0,180,255)
fill.BorderSizePixel=0
Instance.new("UICorner",fill).CornerRadius=UDim.new(1,0)
local k=Instance.new("TextButton",bar)
k.Size=UDim2.fromOffset(16,16)
k.Position=UDim2.new(val/100,-8,.5,-8)
k.Text=""
k.BackgroundColor3=Color3.new(1,1,1)
Instance.new("UICorner",k).CornerRadius=UDim.new(1,0)
local d=false
local function set(x)
local p=math.clamp((x-bar.AbsolutePosition.X)/bar.AbsoluteSize.X,0,1)
local v=math.round(p*100)
l.Text=name.." "..v
fill.Size=UDim2.new(p,0,1,0)
k.Position=UDim2.new(p,-8,.5,-8)
fn(v)
end
k.MouseButton1Down:Connect(function() d=true end)
bar.InputBegan:Connect(function(i)
if i.UserInputType==Enum.UserInputType.MouseButton1 then
d=true;set(i.Position.X)
end
end)
U.InputChanged:Connect(function(i)
if d and i.UserInputType==Enum.UserInputType.MouseMovement then
set(i.Position.X)
end
end)
U.InputEnded:Connect(function(i)
if i.UserInputType==Enum.UserInputType.MouseButton1 then d=false end
end)
end
slider(75,"Walk Speed",W,function(v)
W=v
if h and not fly then h.WalkSpeed=v end
end)
slider(135,"Jump Power",J,function(v)
J=v
if h then h.JumpPower=v end
end)
slider(195,"Flight Speed",F,function(v)
F=v
end)
-- buttons
local function button(y,text,color)
local b=Instance.new("TextButton",m)
b.Size=UDim2.new(1,-30,0,40)
b.Position=UDim2.fromOffset(15,y)
b.BackgroundColor3=color
b.Text=text
b.TextColor3=Color3.new(1,1,1)
b.TextSize=14
b.Font=Enum.Font.GothamBold
b.AutoButtonColor=true
Instance.new("UICorner",b).CornerRadius=UDim.new(0,8)
return b
end
local fb=button(255,"✈ FLY: OFF [F]",Color3.fromRGB(35,45,60))
local nb=button(305,"🚪 NOCLIP: OFF",Color3.fromRGB(35,45,60))
-- fly
local function stop()
fly=false
if bv then bv:Destroy();bv=nil end
if bg then bg:Destroy();bg=nil end
if h then h.PlatformStand=false;h.WalkSpeed=W end
fb.Text="✈ FLY: OFF [F]"
fb.BackgroundColor3=Color3.fromRGB(35,45,60)
end
local function start()
if not r or not h then return end
fly=true
h.PlatformStand=true
bv=Instance.new("BodyVelocity",r)
bv.MaxForce=Vector3.new(math.huge,math.huge,math.huge)
bg=Instance.new("BodyGyro",r)
bg.MaxTorque=Vector3.new(math.huge,math.huge,math.huge)
bg.P=10000
fb.Text="✈ FLY: ON [F]"
fb.BackgroundColor3=Color3.fromRGB(20,110,80)
end
local function toggleFly()
if fly then stop() else start() end
end
fb.MouseButton1Click:Connect(toggleFly)
U.InputBegan:Connect(function(i,p)
if not p and i.KeyCode==Enum.KeyCode.F then
toggleFly()
end
end)
-- fly movement
R.RenderStepped:Connect(function()
if not fly or not bv then return end
local cam=workspace.CurrentCamera
local d=Vector3.zero
if U:IsKeyDown(Enum.KeyCode.W) then d+=cam.CFrame.LookVector end
if U:IsKeyDown(Enum.KeyCode.S) then d-=cam.CFrame.LookVector end
if U:IsKeyDown(Enum.KeyCode.D) then d+=cam.CFrame.RightVector end
if U:IsKeyDown(Enum.KeyCode.A) then d-=cam.CFrame.RightVector end
if U:IsKeyDown(Enum.KeyCode.Space) then d+=Vector3.yAxis end
if U:IsKeyDown(Enum.KeyCode.LeftControl) then d-=Vector3.yAxis end
if d.Magnitude>0 then d=d.Unit end
bv.Velocity=d*F
bg.CFrame=CFrame.lookAt(r.Position,r.Position+cam.CFrame.LookVector)
end)
-- noclip
nb.MouseButton1Click:Connect(function()
nc=not nc
nb.Text=nc and "🚪 NOCLIP: ON" or "🚪 NOCLIP: OFF"
nb.BackgroundColor3=nc
and Color3.fromRGB(20,110,80)
or Color3.fromRGB(35,45,60)
end)
R.Stepped:Connect(function()
if not c then return end
for _,v in ipairs(c:GetDescendants()) do
if v:IsA("BasePart") then
v.CanCollide=not nc
end
end
end)