Aimcac

Dice Script

Sep 25th, 2015
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.49 KB | None | 0 0
  1. ran = math.random(1,6)
  2. player = getLocalPlayer()
  3. name = getPlayerName(player)
  4.  
  5. function rollDice()
  6.    if ran == 1
  7.      outputChatBox(name.." rolled one!")
  8.    elseif ran == 2
  9.      outputChatBox(name.." rolled two!")
  10.     elseif ran == 3
  11.      outputChatBox(name.."rolled three!")
  12.     elseif ran == 4
  13.      outputChatBox(name.."rolled four!")
  14.     elseif ran == 5
  15.      outputChatBox(name.."rolled five!")
  16.     else outputChatBox(name.."rolled six!")
  17.  end
  18. end
  19.  
  20. addCommandHandler("roll",rollDice)
Advertisement
Add Comment
Please, Sign In to add comment