Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- money = 50
- health = 300
- local function check()
- if money <= 0 then
- print('You are broke')
- if health <= 0 then
- print('You died')
- end
- end
- end
- local function eat()
- print('you ate and lost 20€')
- check()
- money = money-20
- print('you have '.. money ..' €')
- health = health+40
- end
- local function fight()
- print('you fought with thieves on the street,they hit you hard bro')
- health = health-10
- print('you now have '.. health ..' health now')
- end
- local function work()
- print('you worked and you got 55 euros')
- money = money+55
- print('you have '.. money ..' €')
- end
- local function pizza()
- print('you are a man trying to survive modern')
- print('surroundings you can choose from actions such as eat,work and fight')
- sys.print('I want to ')
- lol = io.read()
- if lol == 'eat' then
- check()
- eat()
- pizza()
- elseif lol == 'work' then
- check()
- work()
- pizza()
- elseif lol == 'fight' then
- check()
- fight()
- pizza()
- end
- end
- pizza()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement