Added a condition so that the player cannot go through the ground, commented the parts I thought were necessary