Snail is totally right, please: if you have questions then tell us something about what's (not) happening so that we can help you better. Questions without the essential details will very often never get answered.
That said, I can see from your code the issue that you're probably having.
if player == true:
player is missing an underscore here.
If you need your
if statement to be affected by the variable
_player then it should be:
if _player == true:
Is that correct?