Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- dec = 0
- function onTick()
- gear = input.getNumber(1)
- end
- function rd(num)
- if dec > 0 then
- local mult = 10^(dec or 0)
- return math.floor(num * mult + 0.5) / mult
- else
- return math.floor(num)
- end
- end
- function onDraw()
- screen.setColor(255,255,255)
- if gear == 0 then
- screen.drawTextBox(0,23,32,7,'n',0,0)
- elseif gear == -1 then
- screen.drawTextBox(0,23,32,7,'r',0,0)
- else
- screen.drawTextBox(0,23,32,7,rd(gear),0,0)
- end
- end
Add Comment
Please, Sign In to add comment