Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local c = require("component")
- money = 0
- stavka = 5
- w10 ="minecraft:dirt"
- w20="minecraft:stone"
- w30="minecraft:chest"
- jek1="minecraft:diamond"
- winj1=3
- winj2=4
- winj3=5
- while true do
- os.sleep(0)
- stavkaB = c.redstone.getInput(1)
- stavkaM = c.redstone.getInput(4)
- if stavkaM == 15
- then
- os.sleep(1)
- stavka = stavka - 5
- if stavka == 0
- then
- stavka = 5
- end
- end
- if stavkaB == 15
- then
- os.sleep(1)
- stavka = stavka + 5
- if stavka == 25
- then
- stavka = 20
- end
- end
- vklu = c.redstone.getInput(2)
- if vklu == 0
- then
- else
- if vklu == 15
- then
- money = money - stavka
- proc2 = math.random(1,2)
- proc3 = math.random(1,3)
- cikl = 0
- for cik = 0, 10, 1
- do
- os.sleep(0)
- kl = 4
- ran = math.random(1,3)
- jek = math.random(1,10)
- if ran == 1 and kl == 4
- then
- c.openperipheral_selector.setSlot(4, {['id']=w10})
- ran = math.random(1,3)
- kl =5
- slot1 = 10
- end
- if ran == 2 and kl == 4 then
- c.openperipheral_selector.setSlot(4, {['id']=w20})
- ran = math.random(1,3)
- kl = 5
- slot1 = 20
- end
- if ran == 3 and kl == 4 then
- c.openperipheral_selector.setSlot(4, {['id']=w30})
- ran = math.random(1,3)
- kl = 5
- slot1 = 30
- end
- if jek == 7 and kl == 4
- then
- c.openperipheral_selector.setSlot(4, {['id']=jek1})
- winj1 = 1
- slot1=slot2
- jek =math.random(1,10)
- end
- os.sleep(0)
- if ran == 1 and kl == 4
- then
- c.openperipheral_selector.setSlot(5, {['id']=w10})
- ran = math.random(1,3)
- kl = 6
- slot2 = 10
- end
- if ran == 2 and kl == 5
- then
- c.openperipheral_selector.setSlot(5, {['id']=w20})
- ran = math.random(1,3)
- kl = 6
- slot2 = 20
- end
- if ran == 3 and kl == 5
- then
- c.openperipheral_selector.setSlot(5, {['id']=w30})
- ran = math.random(1,3)
- kl = 6
- slot2 = 30
- end
- if jek == 7 and kl == 5
- then
- c.openperipheral_selector.setSlot(5, {['id']=jek1})
- winj2 = 1
- jek= math.random(1,10)
- slot2=slot3
- end
- os.sleep(0)
- if ran == 1 and kl == 6
- then
- c.openperipheral_selector.setSlot(6, {['id']=w10})
- ran = math.random(1,3)
- kl = 4
- slot3 =10
- end
- if ran == 2 and kl == 6
- then
- c.openperipheral_selector.setSlot(6, {['id']=w20})
- ran = math.random(1,3)
- kl = 4
- slot3 = 20
- end
- if ran == 3 and kl == 6
- then
- c.openperipheral_selector.setSlot(6, {['id']=w30})
- ran = math.random(1,3)
- if jek == 7 and kl == 6
- then
- c.openperipheral_selector.setSlot(6,{['id']=jek1})
- winj3 = 1
- slot3=slot2
- end
- kl = 4
- slot3 = 30
- end
- end
- if winj1 == winj2
- then
- if winj2 == winj3
- then
- winj1 = 2
- winj2 = 3
- winj3 = 4
- print("x50")
- money = money + stavka * 50
- end
- end
- if slot1 == slot2
- then
- if slot2 == slot3
- then
- if slot1 == 10
- then print("x2")
- money = money + stavka * 2
- end
- if slot1 == 20
- then
- print("x5")
- money = money + stavka * 5
- end
- if slot1 == 30
- then
- print("x7")
- money = money + stavka * 7
- end
- end
- end
- print("Деньги: "..money )
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement