Robeats Autoplayer (read desc pls)
Key Required

Robeats Autoplayer (read desc pls)

[⚡NEW] RoBeats! 🎧 Music + Rhythm + RPGYakamiYakami 19.5K views 21 executesUpdated Jul 15, 2022
3.3/ 5(6 votes)
4267% Positive
Lua Script•143 lines (5776 chars)
--- 
local keys = shared.keys or {"F", "G", "H", "J"} ------> MAKE THIS YOUR ROBEATS KEYBINDS FROM LEFT TO RIGHT, OR SET IN SHARED.KEYS <-------
 
local VirtualInputManager = game:GetService("VirtualInputManager")
local camera = workspace.CurrentCamera
 
local Autoplayer = {
    noteY = 3879,
    sliderY = 3878,
    laneDistanceThreshold = 25,
    distanceLowerBound = 0.2,
    distanceUpperBound = 0.8,
    delayLowerBound = 0.03,
    delayUpperBound = 0.05,
    sliderDebounce = 0.06,
    random = Random.new(),
    pressedLanes = {},
    heldLanes = {},
    currentLanePositionsIndex = nil,
    lanePositions = {
        {
            Vector3.new(-309.00, 387.70, -181.09),
            Vector3.new(-306.87, 387.70, -178.56),
            Vector3.new(-304.53, 387.70, -176.21),
            Vector3.new(-301.99, 387.70, -174.08)
        },
 
        {
            Vector3.new(-301.99, 387.70, -235.64),
            Vector3.new(-304.53, 387.70, -233.51),
            Vector3.new(-306.87, 387.70, -231.16),
            Vector3.new(-309.00, 387.70, -228.60)
        },
 
        {
            Vector3.new(-247.44, 387.70, -228.63),
            Vector3.new(-249.57, 387.70, -231.16),
            Vector3.new(-251.92, 387.70, -233.51),
            Vector3.new(-254.46, 387.70, -235.64)
        },
 
        {
            Vector3.new(-254.46, 387.70, -174.08),
            Vector3.new(-251.92, 387.70, -176.21),
            Vector3.new(-249.57, 387.70, -178.56),
            Vector3.new(-247.44, 387.70, -181.09)
        }
    }
}
 
local function UpdateLanePositions() -- table.sort cant be used here
    local nearestDistance = Autoplayer.laneDistanceThreshold
    local nearestGroupIndex
 
    for groupIndex, groupPositions in next, Autoplayer.lanePositions do
        local distance = (groupPositions[1] - camera.CFrame.Position).Magnitude
 
        if distance < nearestDistance then
            nearestDistance = distance
            nearestGroupIndex = groupIndex
        end
    end
 
    Autoplayer.currentLanePositionsIndex = nearestGroupIndex
end
 
local function GetNearestLane(position) -- table.sort cant be used here
    UpdateLanePositions()
    
    local nearestDistance = Autoplayer.laneDistanceThreshold
    local nearestLane
 
    for laneIndex, lanePosition in next, Autoplayer.lanePositions[Autoplayer.currentLanePositionsIndex] do
        local distance = (lanePosition - position).Magnitude
 
        if distance < nearestDistance then
            nearestDistance = distance
            nearestLane = {laneIndex, lanePosition}
        end
    end
 
    if not nearestLane then 
        return
    end
 
    return nearestLane[1], nearestLane[2]
end
 
for index, instance in next, workspace:GetDescendants() do
    if instance.ClassName == "CylinderHandleAdornment" then
        instance:GetPropertyChangedSignal("CFrame"):Connect(function()
            if instance.Transparency == 0 and math.floor(instance.CFrame.Y * 10) == Autoplayer.noteY then
                local noteLane, lanePosition = GetNearestLane(instance.CFrame.Position)
                
                if noteLane then
                    local randomDistance = Autoplayer.random:NextNumber(Autoplayer.distanceLowerBound, Autoplayer.distanceUpperBound)
                    local distance = instance.CFrame.Position.X - lanePosition.X
 
                    if Autoplayer.currentLanePositionsIndex > 2 then 
                        distance = math.abs(distance)
                    end
 
                    if not Autoplayer.pressedLanes[noteLane] and distance <= randomDistance then
                        Autoplayer.pressedLanes[noteLane] = true
 
                        VirtualInputManager:SendKeyEvent(true, keys[noteLane], false, game)
                        task.wait(Autoplayer.random:NextNumber(Autoplayer.delayLowerBound, Autoplayer.delayUpperBound))
                        VirtualInputManager:SendKeyEvent(false, keys[noteLane], false, game)
 
                        Autoplayer.pressedLanes[noteLane] = false
                    end
                end
            elseif instance.Transparency < 1 and instance.Height > 0.2 and math.floor(instance.CFrame.Y * 10) == Autoplayer.sliderY then
                local noteLane, lanePosition = GetNearestLane(instance.CFrame.Position)
 
                if noteLane then
                    local randomDistance = Autoplayer.random:NextNumber(Autoplayer.distanceLowerBound, Autoplayer.distanceUpperBound)
                    local distance = (instance.CFrame - instance.CFrame.LookVector * instance.Height / 2).X - lanePosition.X
 
                    if Autoplayer.currentLanePositionsIndex > 2 then 
                        distance = math.abs(distance)
                    end
 
                    if not Autoplayer.heldLanes[noteLane] and distance <= randomDistance then
                        Autoplayer.heldLanes[noteLane] = true
                        
                        VirtualInputManager:SendKeyEvent(true, keys[noteLane], false, game)
                        
                        repeat
                            task.wait() -- ugly but whatever
                        until (Autoplayer.currentLanePositionsIndex > 2 and math.abs((instance.CFrame + instance.CFrame.LookVector * instance.Height / 2).X - lanePosition.X) or (instance.CFrame + instance.CFrame.LookVector * instance.Height / 2).X - lanePosition.X) <= randomDistance
                        
                        VirtualInputManager:SendKeyEvent(false, keys[noteLane], false, game)
                        
                        task.wait(Autoplayer.sliderDebounce)
                        
                        Autoplayer.heldLanes[noteLane] = false
                    end
                end
            end
        end)
    end
end

Features & Information

You can change your keybind in the script I recommend you guys should execute before playing songs that's how the script works + you guys can edit the script for godsake
#RoBeats#Autoplay

Community Comments (21)

calanuunuu1calanuunuu1Jul 15, 2022(edited)

doesnt work

CaleCaleJul 16, 2022(edited)

Doesn't work

AXDWTAXDWTJul 16, 2022(edited)

why errors tell me

YakamiYakamiJul 16, 2022(edited)

@calanuunuu1 @Cale @AXDWT pls read description bruh, execute it and its done, it doesnt show gui or anything

YakamiYakamiJul 16, 2022(edited)

The current keybind that you are using

TestingRobloxScriptsTestingRobloxScriptsJul 16, 2022(edited)

Doesn't work at all even after changing the keybinds.

YakamiYakamiJul 16, 2022(edited)

@TestingRobloxScripts hm, thats weird i think ive say something wrong. bc the script is actually working

YakamiYakamiJul 16, 2022(edited)

you can view the script if something is wrong

YakamiYakamiJul 16, 2022(edited)

your ingame keybinding should be the same as the scripts keybind (sorry for bad English)

CaleCaleJul 16, 2022(edited)

@Yakami, I changed my keybinds to z x , . AND NOTHING HAPPENED

TestingRobloxScriptsTestingRobloxScriptsJul 17, 2022(edited)

Same for me, is there anything that we need to do first? Personally, I change the keybinds first to what is shown on the script then when I start a track, I launch the script but yet nothing happens.

YakamiYakamiJul 17, 2022(edited)

press play choose song and execute ig @TestingRobloxScripts @Cale

CaleCaleJul 17, 2022(edited)

@Yakami, you ************, I did

calanuunuu1calanuunuu1Jul 17, 2022(edited)

doesnt work at all btw

calanuunuu1calanuunuu1Jul 17, 2022(edited)

nvm it works now :))) ty

TestingRobloxScriptsTestingRobloxScriptsJul 18, 2022(edited)

Thanks for changing the weird keys, it works perfectly fine now!

TestingRobloxScriptsTestingRobloxScriptsJul 18, 2022(edited)

However, it's very buggy and it often misses for no reason

YakamiYakamiJul 19, 2022(edited)

@TestingRobloxScripts probably the offset time, set it to 0ms

TestingRobloxScriptsTestingRobloxScriptsJul 20, 2022(edited)

@Yakami it is at 0, it's just bugging. It depends on which music you play, but it will keep missing at the moment.

YakamiYakamiJul 21, 2022(edited)

@TestingRobloxScripts it depends on which fps ur playing or somehow the exploit is weak.

MicrowaveCaprisunMicrowaveCaprisunAug 16, 2022(edited)

finally a script that works well and doesn't miss almost every note after hitting it

More Scripts for [⚡NEW] RoBeats! 🎧 Music + Rhythm + RPG