Hello, you need to use a Remote Event, to fire the value over to the server. Changing it on the client won’t work. What you can do is fire over your math.random result and then on the server pick that up and change the value to it.
Transfer the SCRAM() function to a serverscript, and make a remote event. Once the button get’s clicked, you fire the remote event and the server will handle the rest. Make sure to remove the script.Disabled = true line. It would look like this: