Use task.wait(TimeGoesHere) instead of wait(). This is because the regular wait() is throttled while task.wait() is based on the time that has past since the last heartbeat.
This is good practice, but the actual reason for the bunch of decimals is float imprecision. Basically, floats only approximate real numbers and can’t store them 100% precisely. This means that your numbers can have those miniscule variations, which results in these ugly looking strings. You can get rid of them by presenting the number with a maximum number of digits after the decimal point and rounding the number based on it. This can be done with string.format(), using a specifier such as G, like this: string.format("%G", stunTime)
Just as a side note, personally I like to just use regular integers for something like what you’re doing. Just factor everything up by a power of ten to whatever precision you need. Unless you’re doing heavier mathetical stuff where you actually want the float precision, floats mostly matter when you need to display a number to a player or perform a calculation with the number and in those instances you can just divide it by whatever you multiplied by. Of course thats not always the case, but it tends to be a lot quicker with less formatting in the end for me.