- Key required
- Mobile untested
Advertisement
Advertisement
About this script
-- KING HUB | MOBILE EDITION
-- LocalScript
local Players = game:GetService("Players")
local UIS = game:GetService("UserInputService")
local RunService = game:GetService("RunService")
local player = Players.LocalPlayer
local camera = workspace.CurrentCamera
local gui = Instance.new("ScreenGui")
gui.Name = "KING_HUB"
gui.ResetOnSpawn = false
gui.Parent = player:WaitForChild("PlayerGui")
local panel = Instance.new("Frame")
panel.Size = UDim2.fromOffset(270, 390)
panel.Position = UDim2.new(0.5, -135, 0.5, -195)
panel.BackgroundColor3 = Color3.fromRGB(18,18,18)
panel.Parent = gui
Instance.new("UICorner", panel).CornerRadius =
UDim.new(0, 12)
local stroke = Instance.new("UIStroke", panel)
stroke.Color = Color3.fromRGB(220,25,35)
stroke.Thickness = 2
local title = Instance.new("TextLabel")
title.Size = UDim2.new(1,0,0,45)
title.BackgroundColor3 = Color3.fromRGB(130,0,0)
title.Text = "KING HUB"
title.TextColor3 = Color3.new(1,1,1)
title.TextSize = 22
title.Font = Enum.Font.GothamBold
title.Parent = panel
local function makeButton(name, y)
local b = Instance.new("TextButton")
b.Size = UDim2.new(0.85,0,0,38)
b.Position = UDim2.new(0.075,0,0,y)
b.BackgroundColor3 = Color3.fromRGB(65,20,20)
b.TextColor3 = Color3.new(1,1,1)
b.TextSize = 15
b.Font = Enum.Font.GothamBold
b.Text = name .. ": OFF"
b.Parent = panel
Instance.new("UICorner",b).CornerRadius =
UDim.new(0,8)
return b
end
local flyButton = makeButton("FLY",60)
local camButton = makeButton("FREE CAM",110)
local resetButton = makeButton("RESET CAMERA",160)
local function makeSlider(labelText,y,defaultValue)
local label = Instance.new("TextLabel")
label.Size = UDim2.new(0.85,0,0,25)
label.Position = UDim2.new(0.075,0,0,y)
label.BackgroundTransparency = 1
label.TextColor3 = Color3.new(1,1,1)
label.Text = labelText .. ": " .. defaultValue
label.Parent = panel
local slider = Instance.new("TextButton")
slider.Size = UDim2.new(0.85,0,0,28)
slider.Position = UDim2.new(0.075,0,0,y+25)
slider.BackgroundColor3 = Color3.fromRGB(100,20,20)
slider.Text = "TAP TO INCREASE"
slider.TextColor3 = Color3.new(1,1,1)
slider.Parent = panel
local value = defaultValue
slider.Activated:Connect(function()
value = value + 10
if value > 100 then value = 10 end
label.Text = labelText .. ": " .. value
end)
return function()
return value
end
end
local getFlySpeed = makeSlider("FLY SPEED",210,50)
local getCamSpeed = makeSlider("CAM SPEED",270,25)
local flying = false
local freeCam = false
local flyConnection
local camConnection
local flyVelocity
local function getCharacter()
return player.Character
end
flyButton.Activated:Connect(function()
flying = not flying
flyButton.Text = "FLY: " .. (flying and "ON" or "OFF")
if flying then
local char = getCharacter()
local root = char and char:FindFirstChild("HumanoidRootPart")
if not root then return end
flyVelocity = Instance.new("BodyVelocity")
flyVelocity.MaxForce = Vector3.new(1e6,1e6,1e6)
flyVelocity.Parent = root
flyConnection = RunService.RenderStepped:Connect(function()
if not flying then return end
flyVelocity.Velocity =
camera.CFrame.LookVector * getFlySpeed()
end)
else
if flyConnection then flyConnection:Disconnect() end
if flyVelocity then flyVelocity:Destroy() end
end
end)
local oldCamera
local camPosition
camButton.Activated:Connect(function()
freeCam = not freeCam
camButton.Text = "FREE CAM: " ..
(freeCam and "ON" or "OFF")
if freeCam then
oldCamera = camera.CameraType
camPosition = camera.CFrame
camera.CameraType = Enum.CameraType.Scriptable
camConnection = RunService.RenderStepped:Connect(function()
if freeCam then
local move = Vector3.zero
local humanoid = getCharacter()
humanoid = humanoid and humanoid:FindFirstChildOfClass("Humanoid")
if humanoid then
move = humanoid.MoveDirection
end
camPosition = camPosition + move * getCamSpeed() * 0.05
camera.CFrame = CFrame.new(camPosition.Position, camPosition.Position + camPosition.LookVector)
end
end)
else
if camConnection then camConnection:Disconnect() end
camera.CameraType = Enum.CameraType.Custom
camera.CameraSubject = getCharacter():FindFirstChildOfClass("Humanoid")
end
end)
resetButton.Activated:Connect(function()
freeCam = false
camButton.Text = "FREE CAM: OFF"
if camConnection then camConnection:Disconnect() end
camera.CameraTy-- KING HUB | MOBILE EDITION
-- LocalScript
local Players = game:GetService("Players")
local UIS = game:GetService("UserInputService")
local RunService = game:GetService("RunService")
local player = Players.LocalPlayer
local camera = workspace.CurrentCamera
local gui = Instance.new("ScreenGui")
gui.Name = "KING_HUB"
gui.ResetOnSpawn = false
gui.Parent = player:WaitForChild("PlayerGui")
local panel = Instance.new("Frame")
panel.Size = UDim2.fromOffset(270, 390)
panel.Position = UDim2.new(0.5, -135, 0.5, -195)
panel.BackgroundColor3 = Color3.fromRGB(18,18,18)
panel.Parent = gui
Instance.new("UICorner", panel).CornerRadius =
UDim.new(0, 12)
local stroke = Instance.new("UIStroke", panel)
stroke.Color = Color3.fromRGB(220,25,35)
stroke.Thickness = 2
local title = Instance.new("TextLabel")
title.Size = UDim2.new(1,0,0,45)
title.BackgroundColor3 = Color3.fromRGB(130,0,0)
title.Text = "KING HUB"
title.TextColor3 = Color3.new(1,1,1)
title.TextSize = 22
title.Font = Enum.Font.GothamBold
title.Parent = panel
local function makeButton(name, y)
local b = Instance.new("TextButton")
b.Size = UDim2.new(0.85,0,0,38)
b.Position = UDim2.new(0.075,0,0,y)
b.BackgroundColor3 = Color3.fromRGB(65,20,20)
b.TextColor3 = Color3.new(1,1,1)
b.TextSize = 15
b.Font = Enum.Font.GothamBold
b.Text = name .. ": OFF"
b.Parent = panel
Instance.new("UICorner",b).CornerRadius =
UDim.new(0,8)
return b
end
local flyButton = makeButton("FLY",60)
local camButton = makeButton("FREE CAM",110)
local resetButton = makeButton("RESET CAMERA",160)
local function makeSlider(labelText,y,defaultValue)
local label = Instance.new("TextLabel")
label.Size = UDim2.new(0.85,0,0,25)
label.Position = UDim2.new(0.075,0,0,y)
label.BackgroundTransparency = 1
label.TextColor3 = Color3.new(1,1,1)
label.Text = labelText .. ": " .. defaultValue
label.Parent = panel
local slider = Instance.new("TextButton")
slider.Size = UDim2.new(0.85,0,0,28)
slider.Position = UDim2.new(0.075,0,0,y+25)
slider.BackgroundColor3 = Color3.fromRGB(100,20,20)
slider.Text = "TAP TO INCREASE"
slider.TextColor3 = Color3.new(1,1,1)
slider.Parent = panel
local value = defaultValue
slider.Activated:Connect(function()
value = value + 10
if value > 100 then value = 10 end
label.Text = labelText .. ": " .. value
end)
return function()
return value
end
end
local getFlySpeed = makeSlider("FLY SPEED",210,50)
local getCamSpeed = makeSlider("CAM SPEED",270,25)
local flying = false
local freeCam = false
local flyConnection
local camConnection
local flyVelocity
local function getCharacter()
return player.Character
end
flyButton.Activated:Connect(function()
flying = not flying
flyButton.Text = "FLY: " .. (flying and "ON" or "OFF")
if flying then
local char = getCharacter()
local root = char and char:FindFirstChild("HumanoidRootPart")
if not root then return end
flyVelocity = Instance.new("BodyVelocity")
flyVelocity.MaxForce = Vector3.new(1e6,1e6,1e6)
flyVelocity.Parent = root
flyConnection = RunService.RenderStepped:Connect(function()
if not flying then return end
flyVelocity.Velocity =
camera.CFrame.LookVector * getFlySpeed()
end)
else
if flyConnection then flyConnection:Disconnect() end
if flyVelocity then flyVelocity:Destroy() end
end
end)
local oldCamera
local camPosition
camButton.Activated:Connect(function()
freeCam = not freeCam
camButton.Text = "FREE CAM: " ..
(freeCam and "ON" or "OFF")
if freeCam then
oldCamera = camera.CameraType
camPosition = camera.CFrame
camera.CameraType = Enum.CameraType.Scriptable
camConnection = RunService.RenderStepped:Connect(function()
if freeCam then
local move = Vector3.zero
local humanoid = getCharacter()
humanoid = humanoid and humanoid:FindFirstChildOfClass("Humanoid")
if humanoid then
move = humanoid.MoveDirection
end
camPosition = camPosition + move * getCamSpeed() * 0.05
camera.CFrame = CFrame.new(camPosition.Position, camPosition.Position + camPosition.LookVector)
end
end)
else
if camConnection then camConnection:Disconnect() end
camera.CameraType = Enum.CameraType.Custom
camera.CameraSubject = getCharacter():FindFirstChildOfClass("Humanoid")
end
end)
resetButton.Activated:Connect(function()
freeCam = false
camButton.Text = "FREE CAM: OFF"
if camConnection then camConnection:Disconnect() end
camera.CameraTpe = Enum.CameraType.Custom
local char = getCharacter()
if char then
camera.CameraSubject = char:FindFirstChildOfClass("Humanoid")
end
end)pe = Enum.CameraType.Custom
local char = getCharacter()
if char then
camera.CameraSubject = char:FindFirstChildOfClass("Humanoid")
end
end)
Features
- Auto Cash
- Fly
- Free Cam
- Fly Speed Slider
- Toggle Buttons
- Camera Speed Slider
- Camera Control
- UI Customization
- Mobile Support
- Local Script