Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --// Phoenix AFK Hub - by PhoenixYT
- --// Anti-idle + Auto Jump with draggable hub UI
- --// Works on mobile executors (and PC too!)
- -- Services
- local Players = game:GetService("Players")
- local VirtualUser = game:GetService("VirtualUser")
- local CoreGui = game:GetService("CoreGui")
- local UIS = game:GetService("UserInputService")
- -- Globals
- local player = Players.LocalPlayer
- getgenv().AFK_ENABLED = true
- getgenv().AUTOJUMP_ENABLED = false
- -- Notification helper
- local function notify(title, text, duration)
- pcall(function()
- game.StarterGui:SetCore("SendNotification", {
- Title = title;
- Text = text;
- Duration = duration or 3;
- })
- end)
- end
- -- Anti-idle
- local function antiIdle()
- player.Idled:Connect(function()
- if getgenv().AFK_ENABLED then
- VirtualUser:CaptureController()
- VirtualUser:ClickButton2(Vector2.new(0,0))
- end
- end)
- end
- -- UI Setup
- local PhoenixGui = Instance.new("ScreenGui")
- local HubFrame = Instance.new("Frame")
- local Title = Instance.new("TextLabel")
- local AFKButton = Instance.new("TextButton")
- local JumpButton = Instance.new("TextButton")
- local UICorner = Instance.new("UICorner")
- PhoenixGui.Name = "PhoenixAFKHub"
- PhoenixGui.ResetOnSpawn = false
- PhoenixGui.Parent = CoreGui
- -- Hub Frame
- HubFrame.Size = UDim2.new(0, 180, 0, 130)
- HubFrame.Position = UDim2.new(0.5, -90, 0.1, 0)
- HubFrame.BackgroundColor3 = Color3.fromRGB(25, 25, 25)
- HubFrame.Active = true
- HubFrame.Draggable = true
- HubFrame.Parent = PhoenixGui
- UICorner.CornerRadius = UDim.new(0, 12)
- UICorner.Parent = HubFrame
- -- Title
- Title.Size = UDim2.new(1, 0, 0, 30)
- Title.BackgroundTransparency = 1
- Title.Text = "🔥 Phoenix AFK Hub 🔥"
- Title.Font = Enum.Font.GothamBold
- Title.TextScaled = true
- Title.TextColor3 = Color3.new(1, 1, 1)
- Title.Parent = HubFrame
- -- AFK Button
- AFKButton.Size = UDim2.new(0.9, 0, 0, 35)
- AFKButton.Position = UDim2.new(0.05, 0, 0.35, 0)
- AFKButton.BackgroundColor3 = Color3.fromRGB(0, 170, 0)
- AFKButton.Text = "AFK: ON"
- AFKButton.TextColor3 = Color3.new(1, 1, 1)
- AFKButton.TextScaled = true
- AFKButton.Font = Enum.Font.GothamBold
- AFKButton.Parent = HubFrame
- -- Auto Jump Button
- JumpButton.Size = UDim2.new(0.9, 0, 0, 35)
- JumpButton.Position = UDim2.new(0.05, 0, 0.65, 0)
- JumpButton.BackgroundColor3 = Color3.fromRGB(170, 0, 0)
- JumpButton.Text = "Auto Jump: OFF"
- JumpButton.TextColor3 = Color3.new(1, 1, 1)
- JumpButton.TextScaled = true
- JumpButton.Font = Enum.Font.GothamBold
- JumpButton.Parent = HubFrame
- -- Mobile drag support
- local dragging, dragInput, mousePos, framePos
- HubFrame.InputBegan:Connect(function(input)
- if input.UserInputType == Enum.UserInputType.Touch then
- dragging = true
- mousePos = input.Position
- framePos = HubFrame.Position
- end
- end)
- HubFrame.InputChanged:Connect(function(input)
- if dragging and input.UserInputType == Enum.UserInputType.Touch then
- local delta = input.Position - mousePos
- HubFrame.Position = UDim2.new(framePos.X.Scale, framePos.X.Offset + delta.X, framePos.Y.Scale, framePos.Y.Offset + delta.Y)
- end
- end)
- UIS.InputEnded:Connect(function(input)
- if input.UserInputType == Enum.UserInputType.Touch then
- dragging = false
- end
- end)
- -- AFK toggle
- AFKButton.MouseButton1Click:Connect(function()
- getgenv().AFK_ENABLED = not getgenv().AFK_ENABLED
- if getgenv().AFK_ENABLED then
- AFKButton.BackgroundColor3 = Color3.fromRGB(0, 170, 0)
- AFKButton.Text = "AFK: ON"
- notify("Phoenix AFK", "AFK mode enabled ✅", 2)
- else
- AFKButton.BackgroundColor3 = Color3.fromRGB(170, 0, 0)
- AFKButton.Text = "AFK: OFF"
- notify("Phoenix AFK", "AFK mode disabled ❌", 2)
- end
- end)
- -- Auto Jump toggle
- JumpButton.MouseButton1Click:Connect(function()
- getgenv().AUTOJUMP_ENABLED = not getgenv().AUTOJUMP_ENABLED
- if getgenv().AUTOJUMP_ENABLED then
- JumpButton.BackgroundColor3 = Color3.fromRGB(0, 170, 0)
- JumpButton.Text = "Auto Jump: ON"
- notify("Phoenix AFK", "Auto Jump enabled 🟩", 2)
- else
- JumpButton.BackgroundColor3 = Color3.fromRGB(170, 0, 0)
- JumpButton.Text = "Auto Jump: OFF"
- notify("Phoenix AFK", "Auto Jump disabled 🟥", 2)
- end
- end)
- -- Auto jump loop
- task.spawn(function()
- while task.wait(1) do
- if getgenv().AUTOJUMP_ENABLED and player.Character and player.Character:FindFirstChildOfClass("Humanoid") then
- local hum = player.Character:FindFirstChildOfClass("Humanoid")
- hum:ChangeState(Enum.HumanoidStateType.Jumping)
- end
- end
- end)
- -- Start anti-idle
- antiIdle()
- -- Load notification
- notify("Phoenix AFK", "Phoenix AFK Hub loaded 🔥", 4)
- print("[Phoenix AFK Hub] Loaded successfully.")
Advertisement
Add Comment
Please, Sign In to add comment