Advertisement
RobloxNobScript

Roblox Universal Speed Script

Jan 19th, 2025
411
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.15 KB | Gaming | 0 0
  1. -- Speed Hub Script for Executors (Delta, Synapse, etc.)
  2.  
  3. -- Get the player and character
  4. local player = game.Players.LocalPlayer
  5. local character = player.Character or player.CharacterAdded:Wait()
  6. local humanoid = character:WaitForChild("Humanoid")
  7.  
  8. -- Default speed value and stages
  9. local speedStages = {16, 32, 64, 128} -- Defining 4 stages: normal, little faster, fast, faster
  10. local currentSpeedIndex = 1 -- Start at normal speed (index 1)
  11.  
  12. -- Function to update speed based on the current stage
  13. local function updateSpeed()
  14. humanoid.WalkSpeed = speedStages[currentSpeedIndex]
  15. end
  16.  
  17. -- Function to create the GUI
  18. local function createGUI()
  19. -- Create ScreenGui
  20. local screenGui = Instance.new("ScreenGui")
  21. screenGui.Parent = player.PlayerGui
  22.  
  23. -- Create the Speed Hub Frame (smaller size)
  24. local hubFrame = Instance.new("Frame")
  25. hubFrame.Size = UDim2.new(0, 200, 0, 150) -- Smaller size
  26. hubFrame.Position = UDim2.new(0, 50, 0, 50)
  27. hubFrame.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
  28. hubFrame.Visible = true -- Ensure it starts as visible
  29. hubFrame.Parent = screenGui
  30.  
  31. -- Make the hub frame draggable
  32. local dragging = false
  33. local dragInput, dragStart, startPos
  34.  
  35. -- Update the position of the frame as it is being dragged
  36. local function updateDrag(input)
  37. local delta = input.Position - dragStart
  38. hubFrame.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
  39. end
  40.  
  41. -- Listen for when the drag starts
  42. hubFrame.InputBegan:Connect(function(input, gameProcessed)
  43. if gameProcessed then return end
  44. if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
  45. dragging = true
  46. dragStart = input.Position
  47. startPos = hubFrame.Position
  48. input.Changed:Connect(function()
  49. if dragging then
  50. updateDrag(input)
  51. end
  52. end)
  53. end
  54. end)
  55.  
  56. -- Listen for when the drag ends
  57. hubFrame.InputEnded:Connect(function(input)
  58. if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
  59. dragging = false
  60. end
  61. end)
  62.  
  63. -- Create the Increase Speed Button
  64. local increaseButton = Instance.new("TextButton")
  65. increaseButton.Size = UDim2.new(0, 150, 0, 40)
  66. increaseButton.Position = UDim2.new(0, 25, 0, 30)
  67. increaseButton.Text = "Increase Speed"
  68. increaseButton.BackgroundColor3 = Color3.fromRGB(0, 255, 0) -- Green button
  69. increaseButton.Parent = hubFrame
  70.  
  71. -- Create the Decrease Speed Button
  72. local decreaseButton = Instance.new("TextButton")
  73. decreaseButton.Size = UDim2.new(0, 150, 0, 40)
  74. decreaseButton.Position = UDim2.new(0, 25, 0, 80)
  75. decreaseButton.Text = "Decrease Speed"
  76. decreaseButton.BackgroundColor3 = Color3.fromRGB(255, 0, 0) -- Red button
  77. decreaseButton.Parent = hubFrame
  78.  
  79. -- Create the Hub Toggle Button (Initially for closing the hub)
  80. local toggleButton = Instance.new("TextButton")
  81. toggleButton.Size = UDim2.new(0, 150, 0, 40)
  82. toggleButton.Position = UDim2.new(0, 25, 0, 120)
  83. toggleButton.Text = "Close Hub"
  84. toggleButton.BackgroundColor3 = Color3.fromRGB(0, 0, 255) -- Blue button
  85. toggleButton.Parent = hubFrame
  86.  
  87. -- Button click functions to adjust speed
  88. increaseButton.MouseButton1Click:Connect(function()
  89. -- Move to next speed stage if it's not at the last speed
  90. if currentSpeedIndex < #speedStages then
  91. currentSpeedIndex = currentSpeedIndex + 1
  92. end
  93. updateSpeed()
  94. end)
  95.  
  96. decreaseButton.MouseButton1Click:Connect(function()
  97. -- Move to previous speed stage if it's not at the first speed
  98. if currentSpeedIndex > 1 then
  99. currentSpeedIndex = currentSpeedIndex - 1
  100. end
  101. updateSpeed()
  102. end)
  103.  
  104. -- Toggle the visibility of the hub (to close the hub)
  105. toggleButton.MouseButton1Click:Connect(function()
  106. hubFrame.Visible = false -- Hide the hub when clicking Close
  107. reopenButton.Visible = true -- Show the Reopen Hub button
  108. end)
  109.  
  110. -- Create the Reopen Hub Button (visible only after closing the hub)
  111. local reopenButton = Instance.new("TextButton")
  112. reopenButton.Size = UDim2.new(0, 150, 0, 40)
  113. reopenButton.Position = UDim2.new(0, 25, 0, 50)
  114. reopenButton.Text = "Reopen Hub"
  115. reopenButton.BackgroundColor3 = Color3.fromRGB(0, 255, 255) -- Cyan button
  116. reopenButton.Visible = false -- Initially hidden
  117. reopenButton.Parent = screenGui
  118.  
  119. -- Button to reopen the hub
  120. reopenButton.MouseButton1Click:Connect(function()
  121. hubFrame.Visible = true -- Show the hub again
  122. reopenButton.Visible = false -- Hide the Reopen Hub button
  123. end)
  124. end
  125.  
  126. -- Initial setup
  127. createGUI()
  128. updateSpeed()
  129.  
  130. -- Listen for respawn to reset speed
  131. player.CharacterAdded:Connect(function(newCharacter)
  132. character = newCharacter
  133. humanoid = character:WaitForChild("Humanoid")
  134. updateSpeed()
  135. end)
Tags: no
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement