-- [[ Rscripts Risk Notice ]] -- This script is not verified by rscripts.net. Deal with caution. -- -- Stay safe: -- • Never log in on unofficial Roblox sites or lookalike domains. -- • Real Roblox links use roblox.com (check the .com ending). -- • Treat fake Roblox login / "claim reward" pages as phishing. -- [[ End Rscripts Risk Notice ]] --[[ RoBeats Hub · built for Solara (no debug library needed) Autoplay reads the note adornments on your track and presses your lane keys. RightShift = show/hide menu ]] local G = getgenv() if G.RBH and G.RBH.Unload then pcall(G.RBH.Unload) end local H = {conns = {}, alive = true} G.RBH = H local Players = game:GetService("Players") local Run = game:GetService("RunService") local UIS = game:GetService("UserInputService") local TS = game:GetService("TweenService") local Http = game:GetService("HttpService") local LP = Players.LocalPlayer local Cam = workspace.CurrentCamera local HUI = (gethui and gethui()) or game:GetService("CoreGui") local function conn(sig, f) local c = sig:Connect(f) H.conns[#H.conns + 1] = c return c end local function inst(cls, p, parent) local i = Instance.new(cls) for k, v in pairs(p or {}) do i[k] = v end if parent then i.Parent = parent end return i end ----------------------------------------------------------------- settings local S = { Autoplay = false, Accuracy = 100, Offset = -25, Keys = "ASDF", AntiAFK = true, AutoCal = false, CalV = 5, DirectInput = true, } local CFG = "RBHub.json" pcall(function() local t = Http:JSONDecode(readfile(CFG)) for k, v in pairs(t) do if S[k] ~= nil and type(v) == type(S[k]) then S[k] = v end end end) local function save() pcall(function() writefile(CFG, Http:JSONEncode(S)) end) end if S.CalV ~= 5 then S.Offset, S.CalV = 0, 5 save() end -- new speed-independent timing model: offset starts at 0 ----------------------------------------------------------------- track geometry -- Notes are CylinderHandleAdornments (world CFrames) flying out from the stage's CenterEmitter -- toward each player's slot. Your lanes sit at +7.5 / +2.5 / -2.5 / -7.5 degrees off the -- centre->camera line; the hit ring is ~36 studs from the centre. local HIT_R = 39.3 -- real hit line (solved from x1 vs x2.03 note-speed offsets; the game pins held bars here too) local LANE_ANG = {7.5, 2.5, -2.5, -7.5} local pool, center local function findPool() local best, bn for _, c in ipairs(workspace:GetChildren()) do local n = 0 for _, d in ipairs(c:GetChildren()) do if d:IsA("CylinderHandleAdornment") then n += 1 if n > 40 then break end end end if n > 40 and (not bn or n > bn) then best, bn = c, n end end return best end local function findCenter() local camPos, best, bd = Cam.CFrame.Position, nil, nil for _, d in ipairs(workspace:GetDescendants()) do if d.Name == "CenterEmitterProto" then local ok, p = pcall(function() return d:IsA("Model") and d:GetPivot().Position or d.Position end) if ok and p then local dist = (p - camPos).Magnitude if not bd or dist < bd then best, bd = p, dist end end end end return best end ----------------------------------------------------------------- input local VK, KC = {}, {} local function rebuildKeys() for i = 1, 4 do local ch = string.upper(string.sub(S.Keys, i, i)) if ch == "" then ch = string.sub("ASDF", i, i) end VK[i] = string.byte(ch) KC[i] = Enum.KeyCode[ch] or Enum.KeyCode[string.sub("ASDF", i, i)] end end rebuildKeys() -- VirtualInputManager feeds keys straight into the engine: no window focus needed, no OS delay local VIM = nil pcall(function() VIM = Instance.new("VirtualInputManager") end) local function sendKey(l, isDown) if S.DirectInput and VIM then local ok = pcall(VIM.SendKeyEvent, VIM, isDown, KC[l], false, game) if ok then return end end if isDown then keypress(VK[l]) else keyrelease(VK[l]) end end local down = {false, false, false, false} local releaseAt = {0, 0, 0, 0} local lastPress = {0, 0, 0, 0} -- each note is drawn with two cylinders: one press per lane per note local lastPressRad = {0, 0, 0, 0} local function press(l) if not down[l] then sendKey(l, true) down[l] = true end end local function release(l) if down[l] then sendKey(l, false) down[l] = false end end local function releaseAll() for l = 1, 4 do release(l) end end ----------------------------------------------------------------- autoplay local noteState = {} -- adornment -> {rad, t, v, done, target} local stats = {hits = 0, misses = 0, active = 0} local function gauss() return math.sqrt(-2 * math.log(math.max(math.random(), 1e-9))) * math.cos(2 * math.pi * math.random()) end local lastScan = 0 local avgDt = 1 / 60 local vLane = {64, 64, 64, 64} -- last measured note speed per lane (studs/s) ----------------------------------------------------------------- judgment popups + self-calibration -- Each hit shows a Panel whose ImageLabel is the judgment art (asset 698514146 = PERFECT, 698514147 = GREAT). local JUDGE = {["rbxassetid://698514146"] = "P", ["rbxassetid://698514147"] = "G"} local jFolder, jLast = nil, {} local judg = {P = 0, G = 0, O = 0} local cal = {trial = 0, base = nil, delta = 6, n = 0, good = 0, score = {}} local function findJudgeFolder() for _, c in ipairs(workspace:GetChildren()) do for _, m in ipairs(c:GetChildren()) do local il = m:FindFirstChild("ImageLabel", true) if il and il:IsA("ImageLabel") and JUDGE[il.Image] then return c end end end end local function onJudgment(kind) judg[kind] += 1 if not (S.AutoCal and S.Accuracy == 100) then return end if kind == "O" then return end -- misses/okays come from detection, not early/late timing: don't learn from them cal.base = cal.base or S.Offset cal.n += 1 if kind == "P" then cal.good += 1 end if cal.n < 10 then return end -- finished a 10-note trial at base+delta (trial 1) or base-delta (trial 2), or a check at base (trial 0) cal.score[cal.trial] = cal.good / cal.n cal.n, cal.good = 0, 0 if cal.trial == 0 then if cal.score[0] >= 0.95 then cal.delta = math.max(2, cal.delta * 0.7) -- already near perfect: keep, tighten else cal.trial = 1 end elseif cal.trial == 1 then cal.trial = 2 else local up, dn, mid = cal.score[1], cal.score[2], cal.score[0] or 0 if up > dn and up > mid then cal.base += cal.delta elseif dn > up and dn > mid then cal.base -= cal.delta elseif math.max(up, dn) <= mid then cal.delta = math.max(2, cal.delta * 0.7) else cal.delta = math.min(20, cal.delta * 1.5) end cal.anchor = cal.anchor or S.Offset cal.base = math.clamp(math.floor(cal.base + 0.5), cal.anchor - 25, cal.anchor + 25) -- never wander far from the tuned value cal.trial = 0 S.Offset = cal.base save() end local off = cal.trial == 1 and cal.delta or cal.trial == 2 and -cal.delta or 0 cal.applied = cal.base + off end local function readJudgments(center, ax, perp) if not jFolder or not jFolder.Parent then jFolder = findJudgeFolder() if not jFolder then return end end for _, m in ipairs(jFolder:GetChildren()) do local il = m:FindFirstChild("ImageLabel", true) local panel = m:FindFirstChild("Panel") if il and il:IsA("ImageLabel") then local tr, l = il.ImageTransparency, jLast[il] jLast[il] = tr if l and tr < l - 0.2 and panel then -- popup (re)started local rel = Vector3.new(panel.Position.X - center.X, 0, panel.Position.Z - center.Z) local ang = math.deg(math.atan2(rel:Dot(perp), rel:Dot(ax))) if rel:Dot(ax) > 0 and math.abs(ang) < 12 and rel.Magnitude > 25 and rel.Magnitude < 50 then -- my track only onJudgment(JUDGE[il.Image] or "O") end end end end end local pendingPress = {false, false, false, false} local function step(dt) if not S.Autoplay then if down[1] or down[2] or down[3] or down[4] then releaseAll() end return end local now = os.clock() for l = 1, 4 do if pendingPress[l] then pendingPress[l] = false sendKey(l, true) down[l] = true releaseAt[l] = now + 0.045 end end if not pool or not pool.Parent or (not center and now - lastScan > 1) then lastScan = now pool = pool and pool.Parent and pool or findPool() center = findCenter() end if not pool or not center then stats.active = 0 return end local camPos = Cam.CFrame.Position local ax = Vector3.new(camPos.X - center.X, 0, camPos.Z - center.Z) if ax.Magnitude < 1 then return end ax = ax.Unit local perp = Vector3.new(-ax.Z, 0, ax.X) avgDt = avgDt * 0.92 + math.clamp(dt, 1 / 360, 0.1) * 0.08 local off = (S.AutoCal and S.Accuracy == 100 and cal.applied) or S.Offset local lead = avgDt * 1.5 + 0.0255 + off / 1000 -- ~34.5ms input/judge latency in total; Offset/calibration fine-tune (+ = earlier) readJudgments(center, ax, perp) local hold = {false, false, false, false} local active = 0 -- pass 1: collect everything on my four lanes local items, tails = {}, {{}, {}, {}, {}} for _, d in ipairs(pool:GetChildren()) do if d:IsA("CylinderHandleAdornment") and d.Visible then local p = d.CFrame.Position local rel = Vector3.new(p.X - center.X, 0, p.Z - center.Z) local a, o = rel:Dot(ax), rel:Dot(perp) local ang = math.deg(math.atan2(o, a)) if a > 0 and math.abs(ang) < 11 then local lane = math.clamp(math.floor((7.5 - ang) / 5 + 0.5) + 1, 1, 4) local rad = rel.Magnitude local st = noteState[d] if not st or rad < st.rad - 2 then -- new note (or a pooled adornment reused): roll this note's timing error / miss local spread = (100 - S.Accuracy) st = {rad = rad, t = now, rad0 = rad, t0 = now, v = vLane[lane], done = false, err = gauss() * spread * 1.6 / 1000, miss = math.random() < (spread / 100) ^ 2 * 0.35} noteState[d] = st else -- notes speed up as they approach: measure over the last ~80ms (steady, but current) if now - st.t0 >= 0.08 and rad > st.rad0 then st.v = (rad - st.rad0) / (now - st.t0) st.rad0, st.t0 = rad, now if d.Height <= 1 then vLane[lane] = st.v end -- bars grow at spawn, only caps give true speed end st.rad, st.t = rad, now end active += 1 local body = d.Height > 2 and d.Radius > 0.2 items[#items + 1] = {d = d, lane = lane, rad = rad, st = st, body = body} if body and rad - d.Height / 2 < HIT_R - 1 then table.insert(tails[lane], {rad - d.Height / 2, rad + d.Height / 2}) end -- skip bars pinned past the ring end end end -- pass 2: holds keep keys down; heads press; hold tails release local tailHit = {false, false, false, false} local pressQ = {} for _, it in ipairs(items) do local d, lane, rad, st = it.d, it.lane, it.rad, it.st if it.body then -- hold body (centre = middle of the bar): key stays down while its tail hasn't crossed the ring local front, tail = rad + d.Height / 2, rad - d.Height / 2 -- once a hold is being held the game pins the bar's back end a few studs past the ring (~38.9), so allow +4 if front + st.v * lead >= HIT_R - 1 and tail + st.v * lead < HIT_R + 1.5 then hold[lane] = true end elseif d.Radius >= 0.55 and not st.done then if not st.isTail and rad >= 8 and rad < HIT_R - 1 then -- re-check each frame (the bar can lag a frame); lane angle is unreliable right at spawn -- a tail cap sits at the back of a bar that extends well in FRONT of it (a fresh hold head sits at the front) for _, tr in ipairs(tails[lane]) do if math.abs(tr[1] - rad) < 1.5 and tr[2] - rad > 2.5 then st.isTail = true break end end end -- press on the frame nearest the true crossing (centres the +/- half-frame rounding) local predicted = rad + st.v * (lead - st.err + avgDt / 2) if predicted >= HIT_R then st.done = true if st.isTail then tailHit[lane] = true -- end of a hold: let go here elseif rad > HIT_R + 6 then -- already way past: let it go else pressQ[#pressQ + 1] = {lane = lane, rad = rad, miss = st.miss} end end end end stats.active = active -- releases first (a hold can end in the same frame the next note in that lane starts) for l = 1, 4 do if tailHit[l] then release(l) releaseAt[l] = now end end for _, q in ipairs(pressQ) do local l = q.lane -- both cylinders of one note cross within ~10ms at the same spot; real repeated notes are further apart if now - lastPress[l] < 0.025 and math.abs(q.rad - lastPressRad[l]) < 2 then elseif q.miss then stats.misses += 1 lastPress[l], lastPressRad[l] = now, q.rad else if down[l] then sendKey(l, false) down[l] = false pendingPress[l] = true -- an up+down in one frame can read as "no change": press on the next frame else sendKey(l, true) down[l] = true end lastPress[l], lastPressRad[l] = now, q.rad releaseAt[l] = now + 0.045 stats.hits += 1 end end for l = 1, 4 do if tailHit[l] then elseif hold[l] and down[l] then releaseAt[l] = math.max(releaseAt[l], now + 0.03) -- bar only keeps a press alive; the head cap starts it elseif down[l] and now >= releaseAt[l] then release(l) end end -- forget states of hidden adornments for d, st in pairs(noteState) do if not d.Parent or not d.Visible then noteState[d] = nil end end end Run:BindToRenderStep("RBH_Autoplay", Enum.RenderPriority.Last.Value, function(dt) local ok, e = pcall(step, dt) if not ok then warn("[RBH] " .. tostring(e)) end end) ----------------------------------------------------------------- anti-AFK conn(LP.Idled, function() if not S.AntiAFK then return end pcall(function() local vu = game:GetService("VirtualUser") vu:CaptureController() vu:ClickButton2(Vector2.new()) end) end) ----------------------------------------------------------------- UI local C = {bg = Color3.fromRGB(26, 25, 23), card = Color3.fromRGB(40, 38, 35), stroke = Color3.fromRGB(60, 57, 52), clay = Color3.fromRGB(217, 119, 87), text = Color3.fromRGB(238, 234, 226), muted = Color3.fromRGB(150, 145, 136)} local Gui = inst("ScreenGui", {Name = "RBH" .. math.random(1e5, 1e6), ResetOnSpawn = false, DisplayOrder = 50}, HUI) local Win = inst("Frame", {Size = UDim2.fromOffset(270, 0), AutomaticSize = Enum.AutomaticSize.Y, Position = UDim2.new(1, -290, 0, 120), BackgroundColor3 = C.bg, BorderSizePixel = 0, Active = true}, Gui) inst("UICorner", {CornerRadius = UDim.new(0, 10)}, Win) inst("UIStroke", {Color = C.stroke}, Win) inst("UIPadding", {PaddingTop = UDim.new(0, 10), PaddingBottom = UDim.new(0, 10), PaddingLeft = UDim.new(0, 10), PaddingRight = UDim.new(0, 10)}, Win) inst("UIListLayout", {Padding = UDim.new(0, 6), SortOrder = Enum.SortOrder.LayoutOrder}, Win) local order = 0 local function nextOrder() order += 1 return order end local title = inst("TextLabel", {Text = "RoBeats Hub", Font = Enum.Font.GothamBold, TextSize = 15, TextColor3 = C.text, BackgroundTransparency = 1, Size = UDim2.new(1, 0, 0, 22), TextXAlignment = Enum.TextXAlignment.Left, LayoutOrder = nextOrder()}, Win) do -- drag local drag, start, pos title.InputBegan:Connect(function(i) if i.UserInputType == Enum.UserInputType.MouseButton1 then drag, start, pos = true, i.Position, Win.Position end end) conn(UIS.InputChanged, function(i) if drag and i.UserInputType == Enum.UserInputType.MouseMovement then local d = i.Position - start Win.Position = UDim2.new(pos.X.Scale, pos.X.Offset + d.X, pos.Y.Scale, pos.Y.Offset + d.Y) end end) conn(UIS.InputEnded, function(i) if i.UserInputType == Enum.UserInputType.MouseButton1 then drag = false end end) end local refresh = {} local function row(h) local f = inst("Frame", {Size = UDim2.new(1, 0, 0, h or 32), BackgroundColor3 = C.card, BorderSizePixel = 0, LayoutOrder = nextOrder()}, Win) inst("UICorner", {CornerRadius = UDim.new(0, 6)}, f) return f end local function lbl(f, t) return inst("TextLabel", {Text = t, Font = Enum.Font.Gotham, TextSize = 13, TextColor3 = C.text, BackgroundTransparency = 1, Position = UDim2.fromOffset(10, 0), Size = UDim2.new(1, -20, 1, 0), TextXAlignment = Enum.TextXAlignment.Left}, f) end local function toggle(text, key, cb) local f = row() lbl(f, text) local sw = inst("Frame", {AnchorPoint = Vector2.new(1, 0.5), Position = UDim2.new(1, -10, 0.5, 0), Size = UDim2.fromOffset(36, 18), BackgroundColor3 = C.stroke, BorderSizePixel = 0}, f) inst("UICorner", {CornerRadius = UDim.new(0, 9)}, sw) local knob = inst("Frame", {Size = UDim2.fromOffset(14, 14), Position = UDim2.fromOffset(2, 2), BackgroundColor3 = C.text, BorderSizePixel = 0}, sw) inst("UICorner", {CornerRadius = UDim.new(0, 7)}, knob) local function paint() local on = S[key] TS:Create(sw, TweenInfo.new(0.15), {BackgroundColor3 = on and C.clay or C.stroke}):Play() TS:Create(knob, TweenInfo.new(0.15), {Position = on and UDim2.fromOffset(20, 2) or UDim2.fromOffset(2, 2)}):Play() end inst("TextButton", {Text = "", BackgroundTransparency = 1, Size = UDim2.fromScale(1, 1)}, f).MouseButton1Click:Connect(function() S[key] = not S[key] paint() save() if cb then cb(S[key]) end end) paint() refresh[#refresh + 1] = paint end local function slider(text, key, min, max, step) local f = row(46) local l = lbl(f, text) l.Size = UDim2.new(1, -20, 0, 26) local val = inst("TextLabel", {Font = Enum.Font.GothamMedium, TextSize = 13, TextColor3 = C.muted, BackgroundTransparency = 1, AnchorPoint = Vector2.new(1, 0), Position = UDim2.new(1, -10, 0, 0), Size = UDim2.fromOffset(60, 26), TextXAlignment = Enum.TextXAlignment.Right}, f) local bar = inst("Frame", {Position = UDim2.new(0, 10, 0, 30), Size = UDim2.new(1, -20, 0, 6), BackgroundColor3 = C.stroke, BorderSizePixel = 0}, f) inst("UICorner", {CornerRadius = UDim.new(0, 3)}, bar) local fill = inst("Frame", {Size = UDim2.fromScale(0, 1), BackgroundColor3 = C.clay, BorderSizePixel = 0}, bar) inst("UICorner", {CornerRadius = UDim.new(0, 3)}, fill) local hit = inst("TextButton", {Text = "", BackgroundTransparency = 1, Position = UDim2.new(0, 4, 0, 22), Size = UDim2.new(1, -8, 0, 22)}, f) local function paint() fill.Size = UDim2.fromScale(math.clamp((S[key] - min) / (max - min), 0, 1), 1) val.Text = tostring(S[key]) end local dragging = false local function set(x) local a = math.clamp((x - bar.AbsolutePosition.X) / bar.AbsoluteSize.X, 0, 1) S[key] = math.floor((min + (max - min) * a) / step + 0.5) * step paint() end hit.MouseButton1Down:Connect(function(x) dragging = true set(x) end) conn(UIS.InputChanged, function(i) if dragging and i.UserInputType == Enum.UserInputType.MouseMovement then set(i.Position.X) end end) conn(UIS.InputEnded, function(i) if dragging and i.UserInputType == Enum.UserInputType.MouseButton1 then dragging = false save() end end) paint() refresh[#refresh + 1] = paint end local function input(text, key, cb) local f = row() lbl(f, text) local box = inst("TextBox", {Text = S[key], Font = Enum.Font.GothamMedium, TextSize = 13, TextColor3 = C.text, BackgroundColor3 = C.stroke, AnchorPoint = Vector2.new(1, 0.5), Position = UDim2.new(1, -10, 0.5, 0), Size = UDim2.fromOffset(70, 22), ClearTextOnFocus = false}, f) inst("UICorner", {CornerRadius = UDim.new(0, 5)}, box) box.FocusLost:Connect(function() S[key] = box.Text save() if cb then cb(box.Text) end end) end toggle("Autoplay", "Autoplay", function(on) if not on then releaseAll() end end) slider("Accuracy (100 = perfect)", "Accuracy", 0, 100, 1) slider("Timing offset (ms, + = earlier)", "Offset", -60, 60, 1) input("Lane keys", "Keys", function() rebuildKeys() end) toggle("Self-calibrate timing (at 100%)", "AutoCal", function() cal.base, cal.applied, cal.trial, cal.n, cal.good = nil, nil, 0, 0, 0 end) toggle("Direct input (works unfocused)", "DirectInput", function() releaseAll() cal.base, cal.applied, cal.trial, cal.n, cal.good = nil, nil, 0, 0, 0 end) toggle("Anti-AFK", "AntiAFK") local status = inst("TextLabel", {Text = "", Font = Enum.Font.Gotham, TextSize = 12, TextColor3 = C.muted, BackgroundTransparency = 1, Size = UDim2.new(1, 0, 0, 30), TextXAlignment = Enum.TextXAlignment.Left, TextWrapped = true, LayoutOrder = nextOrder()}, Win) task.spawn(function() while H.alive do status.Text = string.format("%s · notes %d · Perfect %d · Great %d · other %d\noffset %s ms%s%s", (pool and center) and "Track found" or "Waiting for a song", stats.active, judg.P, judg.G, judg.O, tostring(cal.applied or S.Offset), (S.AutoCal and S.Accuracy == 100) and " (calibrating)" or "", (S.DirectInput and VIM) and " · direct input" or " · keep Roblox focused") task.wait(0.25) end end) conn(UIS.InputBegan, function(i) if i.KeyCode == Enum.KeyCode.RightShift then Win.Visible = not Win.Visible end end) function H.Unload() H.alive = false pcall(Run.UnbindFromRenderStep, Run, "RBH_Autoplay") releaseAll() for _, c in ipairs(H.conns) do pcall(c.Disconnect, c) end pcall(Gui.Destroy, Gui) if G.RBH == H then G.RBH = nil end end print("[RBH] loaded")