How do I make a system like this?

If you know Sol’s RNG, you know that it has a timed luck system to increases the player’s luck, and when it runs out, it decreases the luck by the same amount as the increase. How would I go about recreating this system?

Include script examples, and explanations. Got any questions? Ask me!

Hello! I completely understand this as I am actually really into this game at the moment! I was thinking maybe something like this?

local LuckTimer = 0

if Roll then--this is a base as i do not know how you will activate your roll system
LuckTimer += 1
   if LuckTime == 10 then
   LuckTimer = 0
   plr.LuckValue.Value *= 2
   end
--normal roll stuff would be here
end

Hope this helps!

That is the roll luck system, I mean like those Green Luck Potions.

I mean, I understand how you managed to mix that up, as they are pretty much the same.