Help with end in a script

Hey developers,
My end display in red when I did it correctly please help. (Well I think.)

Script

could you send the code in blocks like this:

-- code goes here

You have 2 extra ends, remove the 2 inside of the last elseif

You can try re-typing it, or find errors in the dev console.