Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("Welcome to Danamic Casino, a computercraft roulette game, insert a gold bar to play!")
- os.pullEvent("redstone")
- print(" ")
- print(" ")
- print("You can bet on your number being greater than 25, less than 26 or a single number between 1 and 50")
- print(" ")
- print(" ")
- print(" Type and enter less, more or number now please ")
- x = io.read()
- if x == "less" then
- y = math.random(1, 50)
- print(y)
- if y > 25 then
- print(" Oh no! You lost D: ")
- end -- lose
- if y < 26 then
- print(" You won two gold bars! :D ")
- rs.setOutput("right", true)
- rs.setOutput("right",true)
- end -- less
- end -- <26
- if x == "more" then
- p = math.random(1, 50)
- print(p)
- if p < 26 then
- print(" Sorry, you lost D: ")
- end -- lose
- if p > 25 then
- print(" You won two gold bars! :D ")
- rs.setOutput("right", true)
- rs.setOutput("right", true)
- end -- less
- end
- if x == "number" then
- print("Please enter a number between 1 and 50 now.")
- t = io.read()
- m = math.random(1, 50)
- print(m)
- if t == m then
- print("You have won 2 diamonds!")
- rs.setOutput("back", true)
- rs.setOutput("back", true)
- else
- print(" You lost, the odds were against you >:D ")
- end -- if t = m
- -- if m not equal to t
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement