=====RECOJE LAS FRUTAS=====
frutas = {
BANANA = "L"
manzana = "Q"
UVA = "o"
pera = "P"
}
jugador = {
rep = "V"
inventario = 0
}
map = {
"_ _ _ _ _"
"_ _ _ _ _"
"_ _ _ _ _"
"_ _ _ _ _"
"_ _ _ _ _"
"_ _ _ _ _"
"_ _ _ _ _"
}
====JUGADOR=====
jugador.spawn([1]"_")
if when key(W)
jugador([+1a]"_")
if when key(S)
jugador([-1a]"_")
if when key(A)
jugador([+1]"_")
if when key(D)
jugador([-1]"_")
if jugador.toucht frutas then
GoBackPos(former)
====FRUTAS=====
while true do
wait(10)
frutas.random.spawn
([5aleatory]"_")
end
if jugador when key(E) of 1 "_"former then
frutas(selected).backspace()
if frutas(selected)backspace()
jugador.inventario = jugador.inventario +1 AND
place.frutas(selected)backspace() changedby "_"
To embed this project on your website, copy the following code and paste it into your website's HTML: