
KeylessUniversal

--// XS HUB - GOD MODE Floating Button //--
--// By XS Hub //--
local Players = game:GetService("Players")
local LocalPlayer = Players.LocalPlayer
local RunService = game:GetService("RunService")
-- GOD MODE VARIABLE
local GodEnabled = false
local Loop = nil
-- UI
local ScreenGui = Instance.new("ScreenGui", LocalPlayer:WaitForChild("PlayerGui"))
ScreenGui.ResetOnSpawn = false
-- DRAG FRAME
local Button = Instance.new("TextButton", ScreenGui)
Button.Size = UDim2.new(0, 120, 0, 40)
Button.Position = UDim2.new(0.05, 0, 0.4, 0)
Button.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
Button.Text = "God Mode: OFF"
Button.TextColor3 = Color3.fromRGB(255,255,255)
Button.TextScaled = true
Button.BorderSizePixel = 0
Button.BackgroundTransparency = 0.2
Button.ZIndex = 10
-- WATERMARK
local Watermark = Instance.new("TextLabel", ScreenGui)
Watermark.Size = UDim2.new(0, 140, 0, 25)
Watermark.Position = UDim2.new(0.05, 0, 0.36, 0)
Watermark.BackgroundTransparency = 1
Watermark.Text = "By XS Hub"
Watermark.TextColor3 = Color3.fromRGB(0,255,255)
Watermark.TextScaled = true
Watermark.Font = Enum.Font.GothamBold
-- DRAGGING SYSTEM
local dragging = false
local dragInput, dragStart, startPos
local UIS = game:GetService("UserInputService")
local function update(input)
local delta = input.Position - dragStart
Button.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
Watermark.Position = Button.Position - UDim2.new(0, 0, 0, 30)
end
Button.InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 then
dragging = true
dragStart = input.Position
startPos = Button.Position
input.Changed:Connect(function()
if input.UserInputState == Enum.UserInputState.End then
dragging = false
end
end)
end
end)
UIS.InputChanged:Connect(function(input)
if dragging and input.UserInputType == Enum.UserInputType.MouseMovement then
update(input)
end
end)
-- GOD MODE FUNCTION
Button.MouseButton1Click:Connect(function()
GodEnabled = not GodEnabled
if GodEnabled then
Button.Text = "God Mode: ON"
Button.BackgroundColor3 = Color3.fromRGB(0, 200, 0)
Loop = RunService.Heartbeat:Connect(function()
local char = LocalPlayer.Character
if char and char:FindFirstChild("Humanoid") then
local hum = char.Humanoid
hum.Health = math.huge
hum.MaxHealth = math.huge
hum.BreakJointsOnDeath = false
end
end)
else
Button.Text = "God Mode: OFF"
Button.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
if Loop then
Loop:Disconnect()
Loop = nil
end
end
end)



ts dont work