Script Not Working - With NumberRange, Tables, ClickDetector

Why is this script not working? I want it to randomize the crystal’s color depending on the certain percentage and award the user with a badge once clicked.

Script Deleted.