@̜ə2DD#CDD4DDDDDODDODDDDDCDD42DD#2DD#CD?DDODDDDDDDDODDOD42DD#2DD#CD?DDODODDODODDOD42DD#2DD#O?OODDDDDDDDOOO?2DD#2DD#O?OODODDODOOO?2DD#O/O?DDDDOOOODDDDO?O/̬̬̬̈̬̬̬̬̪쬪 >0 "23DDDDDD3#""23DDDDDD3#""23DDDDDD3#"3ODD?33ODD?33ODD?3DODDODDODDODDODDODDDDDODDDDDDDDODDDDDDDDODDDDDDDDODDDDDDDDODDDDDDDDODDDDDODDODDODDODDODDOD3ODD?33ODD?33ODD?3"23DDDDDD3#""23DDDDDD3#""23DDDDDD3#"-- title: PIG -- author: xXx_Bobby Cage_xXx -- desc: Simple dice game -- site: WIP -- license: MIT License (change this to your license of choice) -- version: 1.0 -- script: lua rscore=100 --required score ascore=0 --accumulated score during turn players=2 pscore={} --player scores turn=1 dice=0 win=0 function BOOT() for loop=1,players do table.insert(pscore,0) end turn=math.random(1,players) end function TIC() cls() if win==0 then if turn>players then turn=1 end print("Z - throw a dice",0,0,13) print("X - pass a turn",0,10,13) print("Player: "..turn.."/"..players,0,20,12) print("Score: "..pscore[turn].."/"..rscore,0,30,12) print("Accumulated score during turn: +"..ascore,0,40,12) spr(dice,110,80,-1,3) if keyp(26,60,10) or btnp(4,60,10) then dice=math.random(1,6) if dice==1 then turn=turn+1 ascore=0 else ascore=ascore+dice end end if keyp(24,60,10) or btnp(5,60,10) then pscore[turn]=pscore[turn]+ascore if pscore[turn]>=rscore then win=turn end ascore=0 turn=turn+1 end else print("Player "..win.." gathered "..pscore[win].."/"..rscore,0,0,12) end end