Here is the same code with a health feature added to show you how to use it with variable (as I found variables hard to call in functions lol so I used a sub routine)
Rem ***** Main Source File *****
health = 50
print "Cheat command by DaZ"
print "to activate cheat command line press control and the up key (type health)"
print "Your current health is - ";health
do
if controlkey()=1 AND upkey()=1
cheat()
endif
if escapekey()=1
exit()
endif
loop
function cheat()
input "enter cheat command - ";cheat$
if cheat$ = "health" then gosub cheat_health:
suspend for key
end
endfunction
function exit()
end
endfunction
cheat_health:
health=health+50
print "Your current health is - ";health
return
DaZ
"There is only 2 ways off this island: The first is in little pieces and the seconds with me" - (Hunter/DaZ)