darraghd493

Obby But You’re On a Bike: Auto-Complete GUI

Nov 4th, 2025
1,501
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 4.28 KB | Source Code | 0 0
  1. --[[
  2.     Obby But You’re On a Bike: Auto-Complete GUI
  3.     Original (non-GUI): https://pastebin.com/W1YPeqEU
  4.  
  5.     by darraghd493
  6. ]]
  7.  
  8. local function loadLibrary(url)
  9.     local success, result = pcall(function()
  10.         return loadstring(game:HttpGet(url))()
  11.     end)
  12.     if success then
  13.         return result
  14.     else
  15.         error("Failed to load library from " .. url .. ": " .. tostring(result))
  16.     end
  17. end
  18.  
  19. getgenv().OBYOAB_Settings = { -- Lazy solution for settings storage
  20.     AUTO_COMPLETE = false,
  21.     AUTO_RESET = false,
  22.     AUTO_RESET_DELAY = 30,
  23.     AUTO_RESET_DELAY_RANDOMISATION = 5,
  24. }
  25.  
  26. --#region UI
  27. local Rayfield = loadLibrary("https://raw.githubusercontent.com/SiriusSoftwareLtd/Rayfield/main/source.lua")
  28. local Window = Rayfield:CreateWindow({
  29.     Name = "Obby But You’re On a Bike",
  30.     LoadingTitle = "Obby But You’re On a Bike",
  31.     LoadingSubtitle = "by dd493",
  32.     ConfigurationSaving = {
  33.         Enabled = false,
  34.     },
  35.     KeySystem = false,
  36. })
  37. local AutoFarmTab = Window:CreateTab("Auto-Farm", "gamepad")
  38. AutoFarmTab:CreateSection("Auto-Complete")
  39. AutoFarmTab:CreateToggle({
  40.     Name = "Active",
  41.     CurrentValue = getgenv().OBYOAB_Settings.AUTO_COMPLETE,
  42.     Flag = "AutoCompleteActive",
  43.     Callback = function(value)
  44.         getgenv().OBYOAB_Settings.AUTO_COMPLETE = value
  45.     end,
  46. })
  47. AutoFarmTab:CreateSection("Auto-Reset (for Worlds/Normal)")
  48. AutoFarmTab:CreateToggle({
  49.     Name = "Active",
  50.     CurrentValue = getgenv().OBYOAB_Settings.AUTO_RESET,
  51.     Flag = "AutoResetActive",
  52.     Callback = function(value)
  53.         getgenv().OBYOAB_Settings.AUTO_RESET = value
  54.     end,
  55. })
  56. AutoFarmTab:CreateSlider({
  57.     Name = "Delay (seconds)",
  58.     Range = {0, 120},
  59.     Increment = 1,
  60.     Suffix = "seconds",
  61.     CurrentValue = getgenv().OBYOAB_Settings.AUTO_RESET_DELAY,
  62.     Flag = "AutoResetDelay",
  63.     Callback = function(value)
  64.         getgenv().OBYOAB_Settings.AUTO_RESET_DELAY = value
  65.     end,
  66. })
  67. AutoFarmTab:CreateSlider({
  68.     Name = "Delay Randomisation (seconds)",
  69.     Range = {0, 30},
  70.     Increment = 1,
  71.     Suffix = "seconds",
  72.     CurrentValue = getgenv().OBYOAB_Settings.AUTO_RESET_DELAY_RANDOMISATION,
  73.     Flag = "AutoResetDelayRandomisation",
  74.     Callback = function(value)
  75.         getgenv().OBYOAB_Settings.AUTO_RESET_DELAY_RANDOMISATION = value
  76.     end,
  77. })
  78. --#endregion
  79.  
  80. --#region Script
  81. local ReplicatedStorage = game:GetService("ReplicatedStorage")
  82. local RunService = game:GetService("RunService")
  83. local Workspace = game:GetService("Workspace")
  84. local Players = game:GetService("Players")
  85.  
  86. local LocalPlayer = Players.LocalPlayer
  87.  
  88. local RemoteEvents = ReplicatedStorage:WaitForChild("RemoteEvents")
  89. local NotificationRemote = RemoteEvents:FindFirstChild("Notification")
  90. local ReportResetRemote = RemoteEvents:FindFirstChild("ReportReset")
  91.  
  92. for _, connection in getconnections(NotificationRemote.OnClientEvent) do
  93.     local old; old = hookfunction(connection.Function, function(text, ...)
  94.         -- does text contain "beat"?
  95.         if string.find(string.lower(text), "beat") and getgenv().OBYOAB_Settings.AUTO_RESET then
  96.             if getgenv().OBYOAB_Settings.AUTO_COMPLETE and getgenv().OBYOAB_Settings.AUTO_RESET then
  97.                 task.delay(getgenv().OBYOAB_Settings.AUTO_RESET_DELAY + math.random(0, getgenv().OBYOAB_Settings.AUTO_RESET_DELAY_RANDOMISATION), function()
  98.                     ReportResetRemote:FireServer()
  99.                 end)
  100.             end
  101.             return
  102.         end
  103.         return old(text, ...)
  104.     end)
  105. end
  106.  
  107. while task.wait() do
  108.     if not getgenv().OBYOAB_Settings.AUTO_COMPLETE then
  109.         continue
  110.     end
  111.  
  112.     local checkpoints = Workspace:WaitForChild("WorldMap"):WaitForChild("Checkpoints")
  113.     local endCheckpoint = checkpoints[#checkpoints:GetChildren()]
  114.  
  115.     -- be safe, this is an autofarm after all xD
  116.     local character = LocalPlayer.Character or LocalPlayer.CharacterAdded:Wait()
  117.     local humanoidRootPart = character:WaitForChild("HumanoidRootPart")
  118.  
  119.     repeat RunService.Heartbeat:Wait() until endCheckpoint:FindFirstChild("Hitbox")
  120.     repeat RunService.Heartbeat:Wait() until endCheckpoint.Hitbox:FindFirstChild("TouchInterest")
  121.  
  122.     firetouchinterest(endCheckpoint.Hitbox, humanoidRootPart, true)
  123.     firetouchinterest(endCheckpoint.Hitbox, humanoidRootPart, false)
  124.    
  125.     RunService.Heartbeat:Wait()
  126. end
  127. --#endregion
  128.  
Advertisement
Add Comment
Please, Sign In to add comment