lockplayer
set "imflying" to -5
set "subdivplayerx" to "('playerx'*5)"
set "subdivplayery" to "('playery'*5)"
: "looper"
inc "gravityisabitch" by "('gravityisabitch'<5)"
dec "frictionisabitch" by "('frictionisabitch'>0)"
inc "frictionisabitch" by "('frictionisabitch'<0)"
rel to player
if blocked SOUTH then "#reset"
rel to player
if blocked NORTH then "#ceiling"
if uppressed then "#whee"
if not uppressed then "#setjump0"
if leftpressed then "#gol"
if rightpressed then "#gor"
inc "subdivplayerx" by "frictionisabitch"
inc "subdivplayery" by "gravityisabitch"
if c?? CustomBlock p?? at "('subdivplayerx'/5)" "('subdivplayery'/5)" then "#stop"
if c?? Robot p?? at "('subdivplayerx'/5)" "('subdivplayery'/5)" then "#sendtouch"
put player at "('subdivplayerx'/5)" "('subdivplayery'/5)"
cycle 1
goto "looper"
: "#whee"
if "local" <= 0 then "#return"
set "gravityisabitch" to "imflying"
dec "local" by "('local'>0)"
goto "#return"
: "#reset"
if at SOUTH of player is c?? Robot p?? then "#stouch"
set "local" to 5
set "gravityisabitch" to 0
set "subdivplayery" to "('playery'*5)"
goto "#return"
: "#gol"
set "frictionisabitch" to -5
goto "#return"
: "#gor"
set "frictionisabitch" to 5
goto "#return"
: "#setjump0"
set "local" to 0
goto "#return"
: "#stop"
. "Resets X position"
set "subdivplayerx" to "('playerx'*5)"
set "frictionisabitch" to 0
goto "#return"
: "#sendtouch"
send at "('subdivplayerx'/5)" "('subdivplayery'/5)" to "touch"
set "subdivplayerx" to "('playerx'*5)"
set "frictionisabitch" to 0
goto "#return"
: "#ceiling"
if at NORTH of player is c?? Robot p?? then "#ntouch"
if "gravityisabitch" >= 0 then "#return"
set "gravityisabitch" to 0
set "subdivplayery" to "('playery'*5)"
set "local" to 0
goto "#return"
: "#ntouch"
send at "playerx" "('playery'-1)" to "bump"
goto "#return"
: "#stouch"
send at "playerx" "('playery'+1)" to "squish"
goto "#return"