Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- options:
- prefix: &8[&4Casino&8]
- on load:
- set {jackpot.low} to false
- set {jackpot.low.timer} to 60
- set {jackpot.low.bet} to 0
- set {jackpot.low.antal} to 0
- loop {jackpot.low.puljen::*}:
- delete {jackpot.%loop-value%.low.chance}
- delete {jackpot.%uuid of loop-value%.low.bet}
- delete {jackpot.low.puljen::*}
- loop all players:
- delete {jackpot.%loop-player%.low.chance}
- delete {jackpot.%uuid of loop-player%.low.bet}
- set {jackpot.high} to false
- set {jackpot.high.timer} to 60
- set {jackpot.high.bet} to 0
- set {jackpot.high.antal} to 0
- loop {jackpot.high.puljen::*}:
- delete {jackpot.%loop-value%.high.chance}
- delete {jackpot.%uuid of loop-value%.high.bet}
- delete {jackpot.high.puljen::*}
- loop all players:
- delete {jackpot.%loop-player%.high.chance}
- delete {jackpot.%uuid of loop-player%.high.bet}
- on quit:
- if {jackpot.%uuid of player%.low.bet} is set:
- remove player from {jackpot.low.puljen::*}
- if {jackpot.%uuid of player%.high.bet} is set:
- remove player from {jackpot.high.puljen::*}
- on join:
- if {jackpot.%uuid of player%.low.bet} is set:
- add player to {jackpot.low.puljen::*}
- if {jackpot.%uuid of player%.high.bet} is set:
- add player to {jackpot.high.puljen::*}
- command /jackpot [<text>]:
- trigger:
- if arg-1 is not set:
- open chest with 5 rows named "&8Casino-Menu" to player
- wait 1 tick
- if inventory name of player's current inventory is "&8Casino-Menu":
- format slot 10 of player with 1 green stained glass pane named "&r" to be unstealable
- format slot 11 of player with 1 green stained glass pane named "&r" to be unstealable
- format slot 12 of player with 1 green stained glass pane named "&r" to be unstealable
- format slot 13 of player with 1 green stained glass pane named "&r" to be unstealable
- format slot 14 of player with 1 green stained glass pane named "&r" to be unstealable
- format slot 15 of player with 1 green stained glass pane named "&r" to be unstealable
- format slot 16 of player with 1 green stained glass pane named "&r" to be unstealable
- format slot 20 of player with 1 green stained glass pane named "&r" to be unstealable
- format slot 24 of player with 1 green stained glass pane named "&r" to be unstealable
- format slot 28 of player with 1 green stained glass pane named "&r" to be unstealable
- format slot 29 of player with 1 green stained glass pane named "&r" to be unstealable
- format slot 30 of player with 1 green stained glass pane named "&r" to be unstealable
- format slot 31 of player with 1 green stained glass pane named "&r" to be unstealable
- format slot 32 of player with 1 green stained glass pane named "&r" to be unstealable
- format slot 33 of player with 1 green stained glass pane named "&r" to be unstealable
- format slot 34 of player with 1 green stained glass pane named "&r" to be unstealable
- format slot 21 of player with 1 ender chest named "&2Gamemode: &bLow Jackpot" with lore "||&aBeskrivelse:|| &7Klik her for at blive || &7sendt til vores low|| &7jackpot menu||&r||" to run [execute player command "jackpot low"]
- format slot 22 of player with 1 green stained glass pane named "&r" to be unstealable
- format slot 23 of player with 1 ender chest named "&2Gamemode: &cHigh Jackpot" with lore "||&aBeskrivelse:|| &7Klik her for at blive || &7sendt til vores high|| &7jackpot menu||&r||" to run [execute player command "jackpot high"]
- loop numbers between 0 and 44:
- set {_slot} to loop-value
- if slot {_slot} of player's current inventory is air:
- format slot {_slot} of player with 1 black stained glass named "&r" to be unstealable
- if arg-1 is "lowlist":
- loop {jackpot.low.puljen::*}:
- send "%loop-value%" to player
- send "------------"
- send "%{jackpot.low.antal}%" to player
- if arg-1 is "low":
- if {jackpot.low} is false:
- open chest with 6 rows named "&8Casino: Low Jackpot" to player
- wait 3 ticks
- format slot 36 of player with 1 black stained glass named "&r" to be unstealable
- format slot 44 of player with 1 black stained glass named "&r" to be unstealable
- loop numbers between 0 and 8:
- set {_slot} to loop-value
- if slot {_slot} of player's current inventory is air:
- format slot {_slot} of player with 1 black stained glass named "&r" to be unstealable
- loop numbers between 45 and 53:
- set {_slot} to loop-value
- if slot {_slot} of player's current inventory is air:
- format slot {_slot} of player with 1 black stained glass named "&r" to be unstealable
- set {_heads.jackpot} to 9
- loop {jackpot.low.puljen::*}:
- format slot {_heads.jackpot} of player with skull of loop-value named "&a%loop-value%" with lore "&8&m ||&7Bet &8» &7$%{jackpot.%uuid of loop-value%.low.bet}%||&7Chance &8» &7%{jackpot.%loop-value%.low.chance}%%%||&8&m " to be unstealable
- add 1 to {_heads.jackpot}
- set slot 37 of player's current inventory to 1 paper named "&a$1.000" with lore " &7Klik her, for at tilføje til puljen"
- set slot 38 of player's current inventory to 1 paper named "&a$5.000" with lore " &7Klik her, for at tilføje til puljen"
- set slot 39 of player's current inventory to 1 paper named "&a$20.000" with lore " &7Klik her, for at tilføje til puljen"
- set slot 40 of player's current inventory to 1 paper named "&a$50.000" with lore " &7Klik her, for at tilføje til puljen"
- set slot 41 of player's current inventory to 1 paper named "&a$100.000" with lore " &7Klik her, for at tilføje til puljen"
- set slot 42 of player's current inventory to 1 paper named "&a$500.000" with lore " &7Klik her, for at tilføje til puljen"
- set slot 43 of player's current inventory to 1 paper named "&a$1.000.000" with lore " &7Klik her, for at tilføje til puljen"
- if arg-1 is "high":
- if {jackpot.high} is false:
- open chest with 6 rows named "&8Casino: High Jackpot" to player
- wait 3 ticks
- format slot 36 of player with 1 black stained glass named "&r" to be unstealable
- format slot 44 of player with 1 black stained glass named "&r" to be unstealable
- loop numbers between 0 and 8:
- set {_slot} to loop-value
- if slot {_slot} of player's current inventory is air:
- format slot {_slot} of player with 1 black stained glass named "&r" to be unstealable
- loop numbers between 45 and 53:
- set {_slot} to loop-value
- if slot {_slot} of player's current inventory is air:
- format slot {_slot} of player with 1 black stained glass named "&r" to be unstealable
- set {_heads.jackpot} to 9
- loop {jackpot.high.puljen::*}:
- format slot {_heads.jackpot} of player with skull of loop-value named "&a%loop-value%" with lore "&8&m ||&7Bet &8» &7$%{jackpot.%uuid of loop-value%.high.bet}%||&7Chance &8» &7%{jackpot.%loop-value%.high.chance}%%%||&8&m " to be unstealable
- add 1 to {_heads.jackpot}
- set slot 37 of player's current inventory to 1 paper named "&a$1.000" with lore " &7Klik her, for at tilføje til puljen"
- set slot 38 of player's current inventory to 1 paper named "&a$5.000" with lore " &7Klik her, for at tilføje til puljen"
- set slot 39 of player's current inventory to 1 paper named "&a$20.000" with lore " &7Klik her, for at tilføje til puljen"
- set slot 40 of player's current inventory to 1 paper named "&a$50.000" with lore " &7Klik her, for at tilføje til puljen"
- set slot 41 of player's current inventory to 1 paper named "&a$100.000" with lore " &7Klik her, for at tilføje til puljen"
- set slot 42 of player's current inventory to 1 paper named "&a$500.000" with lore " &7Klik her, for at tilføje til puljen"
- set slot 43 of player's current inventory to 1 paper named "&a$1.000.000" with lore " &7Klik her, for at tilføje til puljen"
- on inventory click:
- if inventory name of player's current inventory is "&8Casino: Low Jackpot":
- if {jackpot.low} is false:
- cancel event
- if clicked slot is 37:
- if clicked item is paper:
- execute console command "jackpotbet low %player% 1000"
- set clicked item to air
- wait 10 ticks
- if inventory name of player's current inventory is "&8Casino: Low Jackpot":
- set slot 37 of player's current inventory to 1 paper named "&a$1.000" with lore " &7Klik her, for at tilføje til puljen"
- if clicked slot is 38:
- if clicked item is paper:
- execute console command "jackpotbet low %player% 5000"
- set clicked item to air
- wait 10 ticks
- if inventory name of player's current inventory is "&8Casino: Low Jackpot":
- set slot 38 of player's current inventory to 1 paper named "&a$5.000" with lore " &7Klik her, for at tilføje til puljen"
- if clicked slot is 39:
- if clicked item is paper:
- execute console command "jackpotbet low %player% 20000"
- set clicked item to air
- wait 10 ticks
- if inventory name of player's current inventory is "&8Casino: Low Jackpot":
- set slot 39 of player's current inventory to 1 paper named "&a$20.000" with lore " &7Klik her, for at tilføje til puljen"
- if clicked slot is 40:
- if clicked item is paper:
- execute console command "jackpotbet low %player% 50000"
- set clicked item to air
- wait 10 ticks
- if inventory name of player's current inventory is "&8Casino: Low Jackpot":
- set slot 40 of player's current inventory to 1 paper named "&a$50.000" with lore " &7Klik her, for at tilføje til puljen"
- if clicked slot is 41:
- if clicked item is paper:
- execute console command "jackpotbet low %player% 100000"
- set clicked item to air
- wait 10 ticks
- if inventory name of player's current inventory is "&8Casino: Low Jackpot":
- set slot 41 of player's current inventory to 1 paper named "&a$100.000" with lore " &7Klik her, for at tilføje til puljen"
- if clicked slot is 42:
- if clicked item is paper:
- execute console command "jackpotbet low %player% 500000"
- set clicked item to air
- wait 10 ticks
- if inventory name of player's current inventory is "&8Casino: Low Jackpot":
- set slot 42 of player's current inventory to 1 paper named "&a$500.000" with lore " &7Klik her, for at tilføje til puljen"
- if clicked slot is 43:
- if clicked item is paper:
- execute console command "jackpotbet low %player% 1000000"
- set clicked item to air
- wait 10 ticks
- if inventory name of player's current inventory is "&8Casino: Low Jackpot":
- set slot 43 of player's current inventory to 1 paper named "&a$1.000.000" with lore " &7Klik her, for at tilføje til puljen"
- if inventory name of player's current inventory is "&8Casino: High Jackpot":
- if {jackpot.high} is false:
- cancel event
- if clicked slot is 37:
- if clicked item is paper:
- execute console command "jackpotbet high %player% 1000"
- set clicked item to air
- wait 10 ticks
- if inventory name of player's current inventory is "&8Casino: High Jackpot":
- set slot 37 of player's current inventory to 1 paper named "&a$1.000" with lore " &7Klik her, for at tilføje til puljen"
- if clicked slot is 38:
- if clicked item is paper:
- execute console command "jackpotbet high %player% 5000"
- set clicked item to air
- wait 10 ticks
- if inventory name of player's current inventory is "&8Casino: High Jackpot":
- set slot 38 of player's current inventory to 1 paper named "&a$5.000" with lore " &7Klik her, for at tilføje til puljen"
- if clicked slot is 39:
- if clicked item is paper:
- execute console command "jackpotbet high %player% 20000"
- set clicked item to air
- wait 10 ticks
- if inventory name of player's current inventory is "&8Casino: High Jackpot":
- set slot 39 of player's current inventory to 1 paper named "&a$20.000" with lore " &7Klik her, for at tilføje til puljen"
- if clicked slot is 40:
- if clicked item is paper:
- execute console command "jackpotbet high %player% 50000"
- set clicked item to air
- wait 10 ticks
- if inventory name of player's current inventory is "&8Casino: High Jackpot":
- set slot 40 of player's current inventory to 1 paper named "&a$50.000" with lore " &7Klik her, for at tilføje til puljen"
- if clicked slot is 41:
- if clicked item is paper:
- execute console command "jackpotbet high %player% 100000"
- set clicked item to air
- wait 10 ticks
- if inventory name of player's current inventory is "&8Casino: High Jackpot":
- set slot 41 of player's current inventory to 1 paper named "&a$100.000" with lore " &7Klik her, for at tilføje til puljen"
- if clicked slot is 42:
- if clicked item is paper:
- execute console command "jackpotbet high %player% 500000"
- set clicked item to air
- wait 10 ticks
- if inventory name of player's current inventory is "&8Casino: High Jackpot":
- set slot 42 of player's current inventory to 1 paper named "&a$500.000" with lore " &7Klik her, for at tilføje til puljen"
- if clicked slot is 43:
- if clicked item is paper:
- execute console command "jackpotbet high %player% 1000000"
- set clicked item to air
- wait 10 ticks
- if inventory name of player's current inventory is "&8Casino: High Jackpot":
- set slot 43 of player's current inventory to 1 paper named "&a$1.000.000" with lore " &7Klik her, for at tilføje til puljen"
- command /jackpotbet [<text>] [<player>] [<integer>]:
- permission: console.command
- trigger:
- if {jackpot.%arg-1%.antal} is less than 27:
- if arg-2's balance is less than arg-3:
- send "{@prefix} &cDu har ikke penge nok!" to arg-2
- stop
- else:
- if arg-1 is "low":
- if {jackpot.%uuid of arg-2%.%arg-1%.bet} + arg-3 is greater than 2000001:
- send "{@prefix} &cDu kan max. satse &4$2000000&c!" to arg-2
- stop
- else:
- subtract arg-3 from arg-2's balance
- if {jackpot.%uuid of arg-2%.%arg-1%.bet} is not set:
- add arg-2 to {jackpot.%arg-1%.puljen::*}
- add 1 to {jackpot.%arg-1%.antal}
- else:
- remove arg-2 from {jackpot.%arg-1%.puljen::*}
- add arg-2 to {jackpot.%arg-1%.puljen::*}
- add arg-3 to {jackpot.%uuid of arg-2%.%arg-1%.bet}
- add arg-3 to {jackpot.%arg-1%.bet}
- loop all players:
- if inventory name of loop-player's current inventory is "&8Casino: %arg-1% Jackpot":
- set {_heads.jackpot} to 9
- loop {jackpot.%arg-1%.puljen::*}:
- set {jackpot.%loop-value-2%.%arg-1%.chance} to {jackpot.%uuid of loop-value-2%.%arg-1%.bet} / {jackpot.%arg-1%.bet}
- set {jackpot.%loop-value-2%.%arg-1%.chance} to {jackpot.%loop-value-2%.%arg-1%.chance} * 100
- format slot {_heads.jackpot} of loop-player with skull of loop-value-2 named "&a%loop-value-2%" with lore "&8&m ||&7Bet &8» &7$%{jackpot.%uuid of loop-value-2%.%arg-1%.bet}%||&7Chance &8» &7%{jackpot.%loop-value-2%.%arg-1%.chance}%%%||&8&m " to be unstealable
- add 1 to {_heads.jackpot}
- if arg-1 is "high":
- if {jackpot.%uuid of arg-2%.%arg-1%.bet} + arg-3 is greater than 2000001:
- send "{@prefix} &cDu kan max. satse &4$2000000&c!" to arg-2
- stop
- subtract arg-3 from arg-2's balance
- if {jackpot.%uuid of arg-2%.%arg-1%.bet} is not set:
- add arg-2 to {jackpot.%arg-1%.puljen::*}
- add 1 to {jackpot.%arg-1%.antal}
- else:
- remove arg-2 from {jackpot.%arg-1%.puljen::*}
- add arg-2 to {jackpot.%arg-1%.puljen::*}
- add arg-3 to {jackpot.%uuid of arg-2%.%arg-1%.bet}
- add arg-3 to {jackpot.%arg-1%.bet}
- loop all players:
- if inventory name of loop-player's current inventory is "&8Casino: %arg-1% Jackpot":
- set {_heads.jackpot} to 9
- loop {jackpot.%arg-1%.puljen::*}:
- set {jackpot.%loop-value-2%.%arg-1%.chance} to {jackpot.%uuid of loop-value-2%.%arg-1%.bet} / {jackpot.%arg-1%.bet}
- set {jackpot.%loop-value-2%.%arg-1%.chance} to {jackpot.%loop-value-2%.%arg-1%.chance} * 100
- format slot {_heads.jackpot} of loop-player with skull of loop-value-2 named "&a%loop-value-2%" with lore "&8&m ||&7Bet &8» &7$%{jackpot.%uuid of loop-value-2%.%arg-1%.bet}%||&7Chance &8» &7%{jackpot.%loop-value-2%.%arg-1%.chance}%%%||&8&m " to be unstealable
- add 1 to {_heads.jackpot}
- else:
- send "{@prefix} &aDer er ikke plads til flere! &8(&a%{jackpot.%arg-1%.antal}%&7/&a27&8)"
- every 1 second:
- if {jackpot.low} is false:
- if {jackpot.low.antal} is greater than 1:
- if {jackpot.low.timer} is greater than 0:
- subtract 1 from {jackpot.low.timer}
- loop all players:
- if inventory name of loop-player's current inventory is "&8Casino: Low Jackpot":
- format slot 49 of loop-player with 1 160:4 named "&a%{jackpot.low.timer}% sekunder" to be unstealable
- if {jackpot.low.timer} is less than 1:
- set {jackpot.low} to true
- else:
- loop all players:
- if inventory name of loop-player's current inventory is "&8Casino: Low Jackpot":
- format slot 49 of loop-player with 1 160:5 named "&aIkke nok spillere" to be unstealable
- loop {jackpot.low.puljen::*}:
- set {jackpot.%loop-value%.low.chance} to {jackpot.%uuid of loop-value%.low.bet} / {jackpot.low.bet}
- set {jackpot.%loop-value%.low.chance} to {jackpot.%loop-value%.low.chance} * 100
- if {jackpot.high} is false:
- if {jackpot.high.antal} is greater than 1:
- if {jackpot.high.timer} is greater than 0:
- subtract 1 from {jackpot.high.timer}
- loop all players:
- if inventory name of loop-player's current inventory is "&8Casino: High Jackpot":
- format slot 49 of loop-player with 1 160:4 named "&a%{jackpot.high.timer}% sekunder" to be unstealable
- if {jackpot.high.timer} is less than 1:
- set {jackpot.high} to true
- else:
- loop all players:
- if inventory name of loop-player's current inventory is "&8Casino: High Jackpot":
- format slot 49 of loop-player with 1 160:5 named "&aIkke nok spillere" to be unstealable
- loop {jackpot.high.puljen::*}:
- set {jackpot.%loop-value%.high.chance} to {jackpot.%uuid of loop-value%.high.bet} / {jackpot.high.bet}
- set {jackpot.%loop-value%.high.chance} to {jackpot.%loop-value%.high.chance} * 100
- if {jackpot.low} is true:
- delete {jackpot.low}
- loop {jackpot.low.puljen::*}:
- chance of {jackpot.%loop-value-1%.low.chance}%:
- set {jackpot.low.vinder} to loop-value
- wait 1 second
- make console execute command "/eco give %{jackpot.low.vinder}% %{jackpot.low.bet}%"
- broadcast "{@prefix} &a%{jackpot.low.vinder}% &7vandt Low Jackpot på &a$%{jackpot.low.bet}% &7med &a%{jackpot.%{jackpot.low.vinder}%.low.chance}%%% Chance&7."
- set {jackpot.low} to false
- set {jackpot.low.timer} to 60
- set {jackpot.low.bet} to 0
- set {jackpot.low.antal} to 0
- delete {jackpot.low.vinder}
- loop {jackpot.low.puljen::*}:
- delete {jackpot.%loop-value-2%.low.chance}
- delete {jackpot.%uuid of loop-value-2%.low.bet}
- delete {jackpot.low.puljen::*}
- stop
- if {jackpot.high} is true:
- delete {jackpot.high}
- loop {jackpot.high.puljen::*}:
- chance of {jackpot.%loop-value-1%.high.chance}%:
- set {jackpot.high.vinder} to loop-value
- wait 1 second
- make console execute command "/eco give %{jackpot.high.vinder}% %{jackpot.high.bet}%"
- broadcast "{@prefix} &a%{jackpot.high.vinder}% &7vandt High Jackpot på &a$%{jackpot.high.bet}% &7med &a%{jackpot.%{jackpot.high.vinder}%.high.chance}%%% Chance&7."
- set {jackpot.high} to false
- set {jackpot.high.timer} to 60
- set {jackpot.high.bet} to 0
- set {jackpot.high.antal} to 0
- delete {jackpot.high.vinder}
- loop {jackpot.high.puljen::*}:
- delete {jackpot.%loop-value-2%.high.chance}
- delete {jackpot.%uuid of loop-value-2%.high.bet}
- delete {jackpot.high.puljen::*}
- stop
Advertisement
Add Comment
Please, Sign In to add comment