Look inside the SINE script to see how it all works.
The original sine script was made by @Joelbot2000