#need help on auto roll system

1 messages · Page 1 of 1 (latest)

hasty breach
#

im working on a game called studs rng and i got the GUI with the quick and auto roll system to switch from off to on and i added a cooldown when clicking the roll button but i want the auto and quick roll to actually work. can someone help

i will add pictures

#

here is the code for the on and off

#

local gui = script.Parent

local autoRollButton = gui:WaitForChild("auto roll button")
local quickRollButton = gui:WaitForChild("quick roll button")

local autoRollOnText = gui:WaitForChild("auto roll on text")
local autoRollOffText = gui:WaitForChild("auto roll off text")

local quickRollOnText = gui:WaitForChild("quick roll on text")
local quickRollOffText = gui:WaitForChild("quick roll off text")

-- Roll button reference
local rollGui = gui.Parent:WaitForChild("roll gui")
local rollButton = rollGui:WaitForChild("RollButton")

-- Settings
local AUTO_ROLL_COOLDOWN = 5

-- State
local autoRollOn = false
local quickRollOn = false
local autoRollThread = nil

local function updateAutoRoll()
autoRollOnText.Visible = autoRollOn
autoRollOffText.Visible = not autoRollOn
end

local function updateQuickRoll()
quickRollOnText.Visible = quickRollOn
quickRollOffText.Visible = not quickRollOn
end

updateAutoRoll()
updateQuickRoll()

-- This simulates a real button click
local function clickRollButton()
if rollButton and rollButton:IsA("GuiButton") then
rollButton:Activate() -- This triggers MouseButton1Click connections
end
end

-- Auto roll loop
local function startAutoRoll()
if autoRollThread then return end

autoRollThread = task.spawn(function()
    while autoRollOn do
        clickRollButton()
        task.wait(AUTO_ROLL_COOLDOWN)
    end
    autoRollThread = nil
end)

end

autoRollButton.MouseButton1Click:Connect(function()
autoRollOn = not autoRollOn
updateAutoRoll()

if autoRollOn then
    startAutoRoll()
end

end)

quickRollButton.MouseButton1Click:Connect(function()
quickRollOn = not quickRollOn
updateQuickRoll()
end)

#

if you can help that would be awsome

wanton lichen
hasty breach
#

huh

novel bladeBOT
#

studio** You are now Level 1! **studio

hasty breach
wanton lichen
#

your code

hasty breach
#

yeah

#

all that matters is it works

#

also i cant code and im broke as shi to hire somone

wanton lichen
#

ah i see

#

well there is no help, if ai can't do it right then time to start your scripting journey

hasty breach
#

dame...

proud sandal
#

the world doesn't need more sols rng clones...

hasty breach
#

IM BORED OK

#

sorry cap lock

glacial panther
#

rng games i always hated on though

#

i thought they were more rather addictive than fun

proud sandal
#

sols rng is just pure simulated gambling, like pets 99

glacial panther
#

the worst part is no offline progression so you’re forced to afk overnight if you want anything so they can get payouts

proud sandal
hasty breach
#

So is the auto roll possible or nah

meager oak
hasty breach
#

How then

glacial panther
#

since its an ai script

#

how can you fix a script you never wrote

hasty breach
#

Idk

glacial panther
#

exactly

#

you cant

hasty breach
#

or I can

glacial panther
#

as its simply harder to do for less payoff

hasty breach
#

ima try

#

even i got it to work but it doesn't follow the cool down command

glacial panther
proud sandal
proud sandal
#

everyone knows that!

glacial panther
proud sandal
#

it's elementary!

glacial panther
#

this way you dont even have to beg, and you just have to lie

proud sandal
# glacial panther an even better strategy is to get one person and promise pay for them to make th...

wow, i would never have thought of that, that's a great idea! but i'm not sure about the lieing part, because then i would have to actually put some thought and effort into this game that I, and I alone, am making, what with all the hard work i'm putting in to get someone else to develop my game for me. Why can't we just not discuss pay at all and instead just keep telling people that we can discuss pay only after the job is done and delivered? That way the game gets made without having to do any of that nauseating thinking like about fairly compensating people for their work. After all, they can talk about fair pay all they like but the only real remuneration people need or deserve is the Privilege to work for me without financial compensation, and this is just common-knowledge fact that everyone already knows. win-win!