Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- XtroHub Executor Hub
- local Players = game:GetService("Players")
- local LocalPlayer = Players.LocalPlayer
- local RunService = game:GetService("RunService")
- local UserInputService = game:GetService("UserInputService")
- local Workspace = game:GetService("Workspace")
- local Debris = game:GetService("Debris")
- -- Character
- local char = LocalPlayer.Character or LocalPlayer.CharacterAdded:Wait()
- local hrp = char:WaitForChild("HumanoidRootPart")
- local humanoid = char:WaitForChild("Humanoid")
- -- Variables
- local flying = false
- local flySpeed = 50
- local walkspeed = 16
- local spinning = false
- local godMode = false
- local touchFlingActive = false
- local flyBV, flyBG = nil, nil
- local spinConnection = nil
- -- GUI setup
- local screenGui = Instance.new("ScreenGui")
- screenGui.Name = "XtroHubGUI"
- screenGui.Parent = game:GetService("CoreGui")
- -- Main frame
- local frame = Instance.new("Frame")
- frame.Size = UDim2.new(0,400,0,500)
- frame.Position = UDim2.new(0,100,0,50)
- frame.BackgroundColor3 = Color3.fromRGB(35,35,35)
- frame.BorderSizePixel = 0
- frame.AnchorPoint = Vector2.new(0,0)
- frame.Parent = screenGui
- local corner = Instance.new("UICorner")
- corner.CornerRadius = UDim.new(0,15)
- corner.Parent = frame
- -- Top bar
- local topBar = Instance.new("Frame")
- topBar.Size = UDim2.new(1,0,0,40)
- topBar.BackgroundColor3 = Color3.fromRGB(25,25,25)
- topBar.Parent = frame
- local topCorner = Instance.new("UICorner")
- topCorner.CornerRadius = UDim.new(0,15)
- topCorner.Parent = topBar
- -- Title
- local title = Instance.new("TextLabel")
- title.Size = UDim2.new(1,-80,1,0)
- title.Position = UDim2.new(0,10,0,0)
- title.BackgroundTransparency = 1
- title.Text = "XtroHub"
- title.TextColor3 = Color3.new(1,1,1)
- title.Font = Enum.Font.SourceSansBold
- title.TextScaled = true
- title.Parent = topBar
- -- Close and minimize buttons
- local closeBtn = Instance.new("TextButton")
- closeBtn.Size = UDim2.new(0,30,0,30)
- closeBtn.Position = UDim2.new(1,-35,0,5)
- closeBtn.Text = "X"
- closeBtn.TextColor3 = Color3.new(1,0,0)
- closeBtn.BackgroundColor3 = Color3.fromRGB(50,50,50)
- closeBtn.Parent = topBar
- local closeCorner = Instance.new("UICorner")
- closeCorner.CornerRadius = UDim.new(0,7)
- closeCorner.Parent = closeBtn
- local minBtn = Instance.new("TextButton")
- minBtn.Size = UDim2.new(0,30,0,30)
- minBtn.Position = UDim2.new(1,-70,0,5)
- minBtn.Text = "-"
- minBtn.TextColor3 = Color3.new(1,1,0)
- minBtn.BackgroundColor3 = Color3.fromRGB(50,50,50)
- minBtn.Parent = topBar
- local minCorner = Instance.new("UICorner")
- minCorner.CornerRadius = UDim.new(0,7)
- minCorner.Parent = minBtn
- -- Minimized circular button
- local miniBtn = Instance.new("TextButton")
- miniBtn.Size = UDim2.new(0,70,0,70)
- miniBtn.Position = UDim2.new(0,100,0,100)
- miniBtn.Text = "XtroHub"
- miniBtn.Font = Enum.Font.SourceSansBold
- miniBtn.TextColor3 = Color3.new(1,1,1)
- miniBtn.BackgroundColor3 = Color3.fromRGB(35,35,35)
- miniBtn.Visible = false
- miniBtn.Parent = screenGui
- local miniCorner = Instance.new("UICorner")
- miniCorner.CornerRadius = UDim.new(1,0)
- miniCorner.Parent = miniBtn
- -- Drag functionality
- local dragging = false
- local dragOffset = Vector2.new()
- topBar.InputBegan:Connect(function(input)
- if input.UserInputType == Enum.UserInputType.MouseButton1 then
- dragging = true
- dragOffset = input.Position - frame.AbsolutePosition
- end
- end)
- topBar.InputEnded:Connect(function(input)
- if input.UserInputType == Enum.UserInputType.MouseButton1 then
- dragging = false
- end
- end)
- UserInputService.InputChanged:Connect(function(input)
- if dragging and input.UserInputType == Enum.UserInputType.MouseMovement then
- frame.Position = UDim2.new(0,input.Position.X - dragOffset.X,0,input.Position.Y - dragOffset.Y)
- end
- end)
- local draggingMini = false
- local miniOffset = Vector2.new()
- miniBtn.InputBegan:Connect(function(input)
- if input.UserInputType == Enum.UserInputType.MouseButton1 then
- draggingMini = true
- miniOffset = input.Position - miniBtn.AbsolutePosition
- end
- end)
- miniBtn.InputEnded:Connect(function(input)
- if input.UserInputType == Enum.UserInputType.MouseButton1 then
- draggingMini = false
- end
- end)
- UserInputService.InputChanged:Connect(function(input)
- if draggingMini and input.UserInputType == Enum.UserInputType.MouseMovement then
- miniBtn.Position = UDim2.new(0,input.Position.X - miniOffset.X,0,input.Position.Y - miniOffset.Y)
- end
- end)
- -- Close/minimize
- closeBtn.MouseButton1Click:Connect(function() screenGui:Destroy() end)
- minBtn.MouseButton1Click:Connect(function() frame.Visible=false miniBtn.Visible=true end)
- miniBtn.MouseButton1Click:Connect(function() frame.Visible=true miniBtn.Visible=false end)
- -- Function to create buttons
- local function createButton(text,posY)
- local btn = Instance.new("TextButton")
- btn.Size = UDim2.new(0,360,0,35)
- btn.Position = UDim2.new(0,20,0,posY)
- btn.BackgroundColor3 = Color3.fromRGB(60,60,60)
- btn.Text = text
- btn.Font = Enum.Font.SourceSansBold
- btn.TextScaled = true
- btn.TextColor3 = Color3.new(1,1,1)
- btn.Parent = frame
- local corner = Instance.new("UICorner")
- corner.CornerRadius = UDim.new(0,10)
- corner.Parent = btn
- return btn
- end
- -- GUI Buttons and textboxes
- local flyBtn = createButton("Fly: OFF",70)
- local flySpeedBox = Instance.new("TextBox",frame)
- flySpeedBox.Size = UDim2.new(0,360,0,30)
- flySpeedBox.Position = UDim2.new(0,20,0,110)
- flySpeedBox.Text = tostring(flySpeed)
- flySpeedBox.TextScaled = true
- flySpeedBox.BackgroundColor3 = Color3.fromRGB(70,70,70)
- flySpeedBox.TextColor3 = Color3.new(1,1,1)
- local speedBtn = createButton("WalkSpeed: 16",150)
- local speedBox = Instance.new("TextBox",frame)
- speedBox.Size = UDim2.new(0,360,0,30)
- speedBox.Position = UDim2.new(0,20,0,190)
- speedBox.Text = tostring(walkspeed)
- speedBox.TextScaled = true
- speedBox.BackgroundColor3 = Color3.fromRGB(70,70,70)
- speedBox.TextColor3 = Color3.new(1,1,1)
- local spinBtn = createButton("Super Spin: OFF",230)
- local tpBox = Instance.new("TextBox",frame)
- tpBox.Size = UDim2.new(0,360,0,30)
- tpBox.Position = UDim2.new(0,20,0,270)
- tpBox.Text = "Player Name"
- tpBox.TextScaled = true
- tpBox.BackgroundColor3 = Color3.fromRGB(70,70,70)
- tpBox.TextColor3 = Color3.new(1,1,1)
- local tpBtn = createButton("Teleport",310)
- local godBtn = createButton("God Mode: OFF",350)
- local touchBtn = createButton("TouchFling: OFF",390)
- -- Key input tracking for fly
- local keys = {}
- UserInputService.InputBegan:Connect(function(input, processed)
- if input.UserInputType==Enum.UserInputType.Keyboard and not processed then keys[input.KeyCode]=true end
- end)
- UserInputService.InputEnded:Connect(function(input)
- if input.UserInputType==Enum.UserInputType.Keyboard then keys[input.KeyCode]=false end
- end)
- -- Fly functions
- local function startFly()
- humanoid.PlatformStand=true
- flyBV = Instance.new("BodyVelocity",hrp)
- flyBV.MaxForce = Vector3.new(1e5,1e5,1e5)
- flyBG = Instance.new("BodyGyro",hrp)
- flyBG.MaxTorque = Vector3.new(1e5,1e5,1e5)
- end
- local function stopFly()
- humanoid.PlatformStand=false
- if flyBV then flyBV:Destroy() end
- if flyBG then flyBG:Destroy() end
- end
- flyBtn.MouseButton1Click:Connect(function()
- flying = not flying
- flyBtn.Text = "Fly: "..(flying and "ON" or "OFF")
- if flying then startFly() else stopFly() end
- end)
- flySpeedBox.FocusLost:Connect(function()
- local val = tonumber(flySpeedBox.Text)
- if val then flySpeed = math.clamp(val,10,500) flySpeedBox.Text=tostring(flySpeed) end
- end)
- -- WalkSpeed
- speedBox.FocusLost:Connect(function()
- local val = tonumber(speedBox.Text)
- if val then walkspeed = math.clamp(val,2,250) humanoid.WalkSpeed=walkspeed speedBox.Text=tostring(walkspeed) speedBtn.Text="WalkSpeed: "..walkspeed end
- end)
- -- Super Spin
- spinBtn.MouseButton1Click:Connect(function()
- spinning = not spinning
- spinBtn.Text = "Super Spin: "..(spinning and "ON" or "OFF")
- if spinning then
- spinConnection = RunService.RenderStepped:Connect(function()
- hrp.CFrame = hrp.CFrame * CFrame.Angles(0,math.rad(1000),0)
- end)
- else
- if spinConnection then spinConnection:Disconnect() end
- end
- end)
- -- Teleport
- tpBtn.MouseButton1Click:Connect(function()
- local targetName = tpBox.Text
- local target = Players:FindFirstChild(targetName)
- if not target then
- for i,v in pairs(Players:GetPlayers()) do if v.DisplayName==targetName then target=v break end end
- end
- if target and target.Character and target.Character:FindFirstChild("HumanoidRootPart") then
- hrp.CFrame = target.Character.HumanoidRootPart.CFrame + Vector3.new(0,5,0)
- end
- end)
- -- God Mode
- godBtn.MouseButton1Click:Connect(function()
- godMode = not godMode
- godBtn.Text = "God Mode: "..(godMode and "ON" or "OFF")
- if godMode then
- humanoid.MaxHealth=math.huge humanoid.Health=humanoid.MaxHealth
- else
- humanoid.MaxHealth=100 humanoid.Health=100
- end
- end)
- -- TouchFling
- touchBtn.MouseButton1Click:Connect(function()
- touchFlingActive = not touchFlingActive
- touchBtn.Text = "TouchFling: "..(touchFlingActive and "ON" or "OFF")
- end)
- -- TouchFling hit detection
- char:WaitForChild("HumanoidRootPart").Touched:Connect(function(hit)
- if touchFlingActive then
- local player = Players:GetPlayerFromCharacter(hit.Parent)
- if player and player.Character and player.Character:FindFirstChild("HumanoidRootPart") then
- local body = Instance.new("BodyVelocity")
- body.Velocity = (hit.Position - hrp.Position).Unit * 100
- body.MaxForce = Vector3.new(1e5,1e5,1e5)
- body.Parent = hit
- Debris:AddItem(body,0.3)
- end
- end
- end)
- -- Fly update
- RunService.RenderStepped:Connect(function()
- if flying and flyBV and flyBG and hrp then
- local moveVec = Vector3.new(0,0,0)
- local cam = Workspace.CurrentCamera
- if keys[Enum.KeyCode.W] then moveVec = moveVec + Vector3.new(0,0,-1) end
- if keys[Enum.KeyCode.S] then moveVec = moveVec + Vector3.new(0,0,1) end
- if keys[Enum.KeyCode.A] then moveVec = moveVec + Vector3.new(-1,0,0) end
- if keys[Enum.KeyCode.D] then moveVec = moveVec + Vector3.new(1,0,0) end
- if keys[Enum.KeyCode.Space] then moveVec = moveVec + Vector3.new(0,1,0) end
- if keys[Enum.KeyCode.LeftControl] then moveVec = moveVec + Vector3.new(0,-1,0) end
- if moveVec.Magnitude>0 then
- local cf = CFrame.new(Vector3.new(), cam.CFrame.LookVector)
- local rel = (cf:VectorToWorldSpace(moveVec)).Unit * flySpeed
- flyBV.Velocity = rel
- else
- flyBV.Velocity = Vector3.new(0,0,0)
- end
- flyBG.CFrame = CFrame.new(hrp.Position, hrp.Position + cam.CFrame.LookVector)
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment