Thank you for the reply! I did get an error when I ran this code though. It was on the line that reads
if (buttinIsPressed != ButtonWasPressed)
The error reads "'buttonPressed' was not declared in this scope". I'm not great with code if you could try and help me again I would greatly appreciate it.