Chaseycoil

Xtrohub - Universal Script Hub

Aug 14th, 2025 (edited)
4,802
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 10.30 KB | Source Code | 0 0
  1. -- XtroHub Executor Hub
  2. local Players = game:GetService("Players")
  3. local LocalPlayer = Players.LocalPlayer
  4. local RunService = game:GetService("RunService")
  5. local UserInputService = game:GetService("UserInputService")
  6. local Workspace = game:GetService("Workspace")
  7. local Debris = game:GetService("Debris")
  8.  
  9. -- Character
  10. local char = LocalPlayer.Character or LocalPlayer.CharacterAdded:Wait()
  11. local hrp = char:WaitForChild("HumanoidRootPart")
  12. local humanoid = char:WaitForChild("Humanoid")
  13.  
  14. -- Variables
  15. local flying = false
  16. local flySpeed = 50
  17. local walkspeed = 16
  18. local spinning = false
  19. local godMode = false
  20. local touchFlingActive = false
  21. local flyBV, flyBG = nil, nil
  22. local spinConnection = nil
  23.  
  24. -- GUI setup
  25. local screenGui = Instance.new("ScreenGui")
  26. screenGui.Name = "XtroHubGUI"
  27. screenGui.Parent = game:GetService("CoreGui")
  28.  
  29. -- Main frame
  30. local frame = Instance.new("Frame")
  31. frame.Size = UDim2.new(0,400,0,500)
  32. frame.Position = UDim2.new(0,100,0,50)
  33. frame.BackgroundColor3 = Color3.fromRGB(35,35,35)
  34. frame.BorderSizePixel = 0
  35. frame.AnchorPoint = Vector2.new(0,0)
  36. frame.Parent = screenGui
  37.  
  38. local corner = Instance.new("UICorner")
  39. corner.CornerRadius = UDim.new(0,15)
  40. corner.Parent = frame
  41.  
  42. -- Top bar
  43. local topBar = Instance.new("Frame")
  44. topBar.Size = UDim2.new(1,0,0,40)
  45. topBar.BackgroundColor3 = Color3.fromRGB(25,25,25)
  46. topBar.Parent = frame
  47. local topCorner = Instance.new("UICorner")
  48. topCorner.CornerRadius = UDim.new(0,15)
  49. topCorner.Parent = topBar
  50.  
  51. -- Title
  52. local title = Instance.new("TextLabel")
  53. title.Size = UDim2.new(1,-80,1,0)
  54. title.Position = UDim2.new(0,10,0,0)
  55. title.BackgroundTransparency = 1
  56. title.Text = "XtroHub"
  57. title.TextColor3 = Color3.new(1,1,1)
  58. title.Font = Enum.Font.SourceSansBold
  59. title.TextScaled = true
  60. title.Parent = topBar
  61.  
  62. -- Close and minimize buttons
  63. local closeBtn = Instance.new("TextButton")
  64. closeBtn.Size = UDim2.new(0,30,0,30)
  65. closeBtn.Position = UDim2.new(1,-35,0,5)
  66. closeBtn.Text = "X"
  67. closeBtn.TextColor3 = Color3.new(1,0,0)
  68. closeBtn.BackgroundColor3 = Color3.fromRGB(50,50,50)
  69. closeBtn.Parent = topBar
  70. local closeCorner = Instance.new("UICorner")
  71. closeCorner.CornerRadius = UDim.new(0,7)
  72. closeCorner.Parent = closeBtn
  73.  
  74. local minBtn = Instance.new("TextButton")
  75. minBtn.Size = UDim2.new(0,30,0,30)
  76. minBtn.Position = UDim2.new(1,-70,0,5)
  77. minBtn.Text = "-"
  78. minBtn.TextColor3 = Color3.new(1,1,0)
  79. minBtn.BackgroundColor3 = Color3.fromRGB(50,50,50)
  80. minBtn.Parent = topBar
  81. local minCorner = Instance.new("UICorner")
  82. minCorner.CornerRadius = UDim.new(0,7)
  83. minCorner.Parent = minBtn
  84.  
  85. -- Minimized circular button
  86. local miniBtn = Instance.new("TextButton")
  87. miniBtn.Size = UDim2.new(0,70,0,70)
  88. miniBtn.Position = UDim2.new(0,100,0,100)
  89. miniBtn.Text = "XtroHub"
  90. miniBtn.Font = Enum.Font.SourceSansBold
  91. miniBtn.TextColor3 = Color3.new(1,1,1)
  92. miniBtn.BackgroundColor3 = Color3.fromRGB(35,35,35)
  93. miniBtn.Visible = false
  94. miniBtn.Parent = screenGui
  95. local miniCorner = Instance.new("UICorner")
  96. miniCorner.CornerRadius = UDim.new(1,0)
  97. miniCorner.Parent = miniBtn
  98.  
  99. -- Drag functionality
  100. local dragging = false
  101. local dragOffset = Vector2.new()
  102. topBar.InputBegan:Connect(function(input)
  103.     if input.UserInputType == Enum.UserInputType.MouseButton1 then
  104.         dragging = true
  105.         dragOffset = input.Position - frame.AbsolutePosition
  106.     end
  107. end)
  108. topBar.InputEnded:Connect(function(input)
  109.     if input.UserInputType == Enum.UserInputType.MouseButton1 then
  110.         dragging = false
  111.     end
  112. end)
  113. UserInputService.InputChanged:Connect(function(input)
  114.     if dragging and input.UserInputType == Enum.UserInputType.MouseMovement then
  115.         frame.Position = UDim2.new(0,input.Position.X - dragOffset.X,0,input.Position.Y - dragOffset.Y)
  116.     end
  117. end)
  118.  
  119. local draggingMini = false
  120. local miniOffset = Vector2.new()
  121. miniBtn.InputBegan:Connect(function(input)
  122.     if input.UserInputType == Enum.UserInputType.MouseButton1 then
  123.         draggingMini = true
  124.         miniOffset = input.Position - miniBtn.AbsolutePosition
  125.     end
  126. end)
  127. miniBtn.InputEnded:Connect(function(input)
  128.     if input.UserInputType == Enum.UserInputType.MouseButton1 then
  129.         draggingMini = false
  130.     end
  131. end)
  132. UserInputService.InputChanged:Connect(function(input)
  133.     if draggingMini and input.UserInputType == Enum.UserInputType.MouseMovement then
  134.         miniBtn.Position = UDim2.new(0,input.Position.X - miniOffset.X,0,input.Position.Y - miniOffset.Y)
  135.     end
  136. end)
  137.  
  138. -- Close/minimize
  139. closeBtn.MouseButton1Click:Connect(function() screenGui:Destroy() end)
  140. minBtn.MouseButton1Click:Connect(function() frame.Visible=false miniBtn.Visible=true end)
  141. miniBtn.MouseButton1Click:Connect(function() frame.Visible=true miniBtn.Visible=false end)
  142.  
  143. -- Function to create buttons
  144. local function createButton(text,posY)
  145.     local btn = Instance.new("TextButton")
  146.     btn.Size = UDim2.new(0,360,0,35)
  147.     btn.Position = UDim2.new(0,20,0,posY)
  148.     btn.BackgroundColor3 = Color3.fromRGB(60,60,60)
  149.     btn.Text = text
  150.     btn.Font = Enum.Font.SourceSansBold
  151.     btn.TextScaled = true
  152.     btn.TextColor3 = Color3.new(1,1,1)
  153.     btn.Parent = frame
  154.     local corner = Instance.new("UICorner")
  155.     corner.CornerRadius = UDim.new(0,10)
  156.     corner.Parent = btn
  157.     return btn
  158. end
  159.  
  160. -- GUI Buttons and textboxes
  161. local flyBtn = createButton("Fly: OFF",70)
  162. local flySpeedBox = Instance.new("TextBox",frame)
  163. flySpeedBox.Size = UDim2.new(0,360,0,30)
  164. flySpeedBox.Position = UDim2.new(0,20,0,110)
  165. flySpeedBox.Text = tostring(flySpeed)
  166. flySpeedBox.TextScaled = true
  167. flySpeedBox.BackgroundColor3 = Color3.fromRGB(70,70,70)
  168. flySpeedBox.TextColor3 = Color3.new(1,1,1)
  169. local speedBtn = createButton("WalkSpeed: 16",150)
  170. local speedBox = Instance.new("TextBox",frame)
  171. speedBox.Size = UDim2.new(0,360,0,30)
  172. speedBox.Position = UDim2.new(0,20,0,190)
  173. speedBox.Text = tostring(walkspeed)
  174. speedBox.TextScaled = true
  175. speedBox.BackgroundColor3 = Color3.fromRGB(70,70,70)
  176. speedBox.TextColor3 = Color3.new(1,1,1)
  177. local spinBtn = createButton("Super Spin: OFF",230)
  178. local tpBox = Instance.new("TextBox",frame)
  179. tpBox.Size = UDim2.new(0,360,0,30)
  180. tpBox.Position = UDim2.new(0,20,0,270)
  181. tpBox.Text = "Player Name"
  182. tpBox.TextScaled = true
  183. tpBox.BackgroundColor3 = Color3.fromRGB(70,70,70)
  184. tpBox.TextColor3 = Color3.new(1,1,1)
  185. local tpBtn = createButton("Teleport",310)
  186. local godBtn = createButton("God Mode: OFF",350)
  187. local touchBtn = createButton("TouchFling: OFF",390)
  188.  
  189. -- Key input tracking for fly
  190. local keys = {}
  191. UserInputService.InputBegan:Connect(function(input, processed)
  192.     if input.UserInputType==Enum.UserInputType.Keyboard and not processed then keys[input.KeyCode]=true end
  193. end)
  194. UserInputService.InputEnded:Connect(function(input)
  195.     if input.UserInputType==Enum.UserInputType.Keyboard then keys[input.KeyCode]=false end
  196. end)
  197.  
  198. -- Fly functions
  199. local function startFly()
  200.     humanoid.PlatformStand=true
  201.     flyBV = Instance.new("BodyVelocity",hrp)
  202.     flyBV.MaxForce = Vector3.new(1e5,1e5,1e5)
  203.     flyBG = Instance.new("BodyGyro",hrp)
  204.     flyBG.MaxTorque = Vector3.new(1e5,1e5,1e5)
  205. end
  206. local function stopFly()
  207.     humanoid.PlatformStand=false
  208.     if flyBV then flyBV:Destroy() end
  209.     if flyBG then flyBG:Destroy() end
  210. end
  211. flyBtn.MouseButton1Click:Connect(function()
  212.     flying = not flying
  213.     flyBtn.Text = "Fly: "..(flying and "ON" or "OFF")
  214.     if flying then startFly() else stopFly() end
  215. end)
  216. flySpeedBox.FocusLost:Connect(function()
  217.     local val = tonumber(flySpeedBox.Text)
  218.     if val then flySpeed = math.clamp(val,10,500) flySpeedBox.Text=tostring(flySpeed) end
  219. end)
  220.  
  221. -- WalkSpeed
  222. speedBox.FocusLost:Connect(function()
  223.     local val = tonumber(speedBox.Text)
  224.     if val then walkspeed = math.clamp(val,2,250) humanoid.WalkSpeed=walkspeed speedBox.Text=tostring(walkspeed) speedBtn.Text="WalkSpeed: "..walkspeed end
  225. end)
  226.  
  227. -- Super Spin
  228. spinBtn.MouseButton1Click:Connect(function()
  229.     spinning = not spinning
  230.     spinBtn.Text = "Super Spin: "..(spinning and "ON" or "OFF")
  231.     if spinning then
  232.         spinConnection = RunService.RenderStepped:Connect(function()
  233.             hrp.CFrame = hrp.CFrame * CFrame.Angles(0,math.rad(1000),0)
  234.         end)
  235.     else
  236.         if spinConnection then spinConnection:Disconnect() end
  237.     end
  238. end)
  239.  
  240. -- Teleport
  241. tpBtn.MouseButton1Click:Connect(function()
  242.     local targetName = tpBox.Text
  243.     local target = Players:FindFirstChild(targetName)
  244.     if not target then
  245.         for i,v in pairs(Players:GetPlayers()) do if v.DisplayName==targetName then target=v break end end
  246.     end
  247.     if target and target.Character and target.Character:FindFirstChild("HumanoidRootPart") then
  248.         hrp.CFrame = target.Character.HumanoidRootPart.CFrame + Vector3.new(0,5,0)
  249.     end
  250. end)
  251.  
  252. -- God Mode
  253. godBtn.MouseButton1Click:Connect(function()
  254.     godMode = not godMode
  255.     godBtn.Text = "God Mode: "..(godMode and "ON" or "OFF")
  256.     if godMode then
  257.         humanoid.MaxHealth=math.huge humanoid.Health=humanoid.MaxHealth
  258.     else
  259.         humanoid.MaxHealth=100 humanoid.Health=100
  260.     end
  261. end)
  262.  
  263. -- TouchFling
  264. touchBtn.MouseButton1Click:Connect(function()
  265.     touchFlingActive = not touchFlingActive
  266.     touchBtn.Text = "TouchFling: "..(touchFlingActive and "ON" or "OFF")
  267. end)
  268.  
  269. -- TouchFling hit detection
  270. char:WaitForChild("HumanoidRootPart").Touched:Connect(function(hit)
  271.     if touchFlingActive then
  272.         local player = Players:GetPlayerFromCharacter(hit.Parent)
  273.         if player and player.Character and player.Character:FindFirstChild("HumanoidRootPart") then
  274.             local body = Instance.new("BodyVelocity")
  275.             body.Velocity = (hit.Position - hrp.Position).Unit * 100
  276.             body.MaxForce = Vector3.new(1e5,1e5,1e5)
  277.             body.Parent = hit
  278.             Debris:AddItem(body,0.3)
  279.         end
  280.     end
  281. end)
  282.  
  283. -- Fly update
  284. RunService.RenderStepped:Connect(function()
  285.     if flying and flyBV and flyBG and hrp then
  286.         local moveVec = Vector3.new(0,0,0)
  287.         local cam = Workspace.CurrentCamera
  288.         if keys[Enum.KeyCode.W] then moveVec = moveVec + Vector3.new(0,0,-1) end
  289.         if keys[Enum.KeyCode.S] then moveVec = moveVec + Vector3.new(0,0,1) end
  290.         if keys[Enum.KeyCode.A] then moveVec = moveVec + Vector3.new(-1,0,0) end
  291.         if keys[Enum.KeyCode.D] then moveVec = moveVec + Vector3.new(1,0,0) end
  292.         if keys[Enum.KeyCode.Space] then moveVec = moveVec + Vector3.new(0,1,0) end
  293.         if keys[Enum.KeyCode.LeftControl] then moveVec = moveVec + Vector3.new(0,-1,0) end
  294.  
  295.         if moveVec.Magnitude>0 then
  296.             local cf = CFrame.new(Vector3.new(), cam.CFrame.LookVector)
  297.             local rel = (cf:VectorToWorldSpace(moveVec)).Unit * flySpeed
  298.             flyBV.Velocity = rel
  299.         else
  300.             flyBV.Velocity = Vector3.new(0,0,0)
  301.         end
  302.         flyBG.CFrame = CFrame.new(hrp.Position, hrp.Position + cam.CFrame.LookVector)
  303.     end
  304. end)
  305.  
Advertisement
Add Comment
Please, Sign In to add comment