# Loops
function samsung:reset_cooldown
function samsung:second
function samsung:ad_drone/move
gamerule command_block_output false

# Scoreboard
function samsung:load/scoreboard
team add samsung_worker {text:"Samsung Worker",color:blue,bold:false}
team modify samsung_worker color blue
team modify samsung_worker prefix ""
# 32-bit integer limit execute if score #samsung_accounts_unlocked value matches -2147483648..2147483647
# Objects
execute in samsung:samsung_store run forceload add -1 -1 -1 0
execute in samsung:samsung_store run setblock -5 101 -3 warped_sign[rotation=4]{front_text:{messages:[{"text":"Checkout","color":"green","bold":true},{"text":""},{"text":""},{"text":""}]},back_text:{messages:[{"text":"Checkout #1",color:green,bold:true},{"text":""},{"text":""},{"text":""}]}}
execute in samsung:samsung_store run fill -5 100 -4 -9 99 2 minecraft:light_gray_concrete
execute in samsung:samsung_store run fill -8 100 1 -6 100 -3 air replace light_gray_concrete
execute in samsung:samsung_store run setblock -5 100 0 command_block{Command:'execute if entity @e[type=villager,tag=samsung_customer,tag=at_checkout_1] as @n[type=villager,tag=samsung_customer,tag=at_checkout_1] run function samsung:new_customer {money:5,void_command:"execute in overworld run tp @s 0 -1000 0"}'}
execute in samsung:samsung_store run setblock -6 100 0 oak_button[face=wall,facing=west]
execute in samsung:samsung_store run setblock -5 101 0 warped_sign[rotation=4]{front_text:{messages:[{"text":"Give Device","color":"green","bold":true},{"text":""},{"text":""},{"text":""}]},back_text:{messages:[{"text":""},{"text":""},{"text":""},{"text":""}]}}
#execute in samsung:samsung_store run function samsung:generation/checkout_2
execute in samsung:samsung_store run forceload remove -1 -1 -1 0
execute in samsung:samsung_store run forceload add -51 -31 -31 -15
execute in samsung:samsung_store run fill -31 99 -15 -51 99 -31 minecraft:light_gray_concrete
execute in samsung:samsung_store run setblock -41 100 -24 minecraft:command_block{Command:"function samsung:make_phone"}
execute in samsung:samsung_store run setblock -41 100 -22 minecraft:command_block{Command:"execute as @p run function samsung:sell_samsung_phone"}
execute in samsung:samsung_store run setblock -41 100 -26 minecraft:command_block{Command:"dialog show @p samsung:one_ui_lanuch"}
execute in samsung:samsung_store run setblock -41 101 -24 minecraft:oak_button[face=floor,facing=west]
execute in samsung:samsung_store run setblock -41 101 -22 minecraft:oak_button[face=floor,facing=west]
execute in samsung:samsung_store run setblock -41 101 -26 minecraft:oak_button[face=floor,facing=west]
execute in samsung:samsung_store run setblock -40 100 -24 minecraft:oak_wall_sign[facing=east]{front_text:{messages:[{"text":"Make Phone",color:yellow,bold:true},{"text":""},{"text":""},{"text":""}]},back_text:{messages:[{"text":"Checkout #1",color:green,bold:true},{"text":""},{"text":""},{"text":""}]}}
execute in samsung:samsung_store run setblock -40 100 -22 minecraft:oak_wall_sign[facing=east]{front_text:{messages:[{"text":"Sell Phone",color:green,bold:true},{"text":""},{"text":""},{"text":""}]},back_text:{messages:[{"text":"Checkout #1",color:green,bold:true},{"text":""},{"text":""},{"text":""}]}}
execute in samsung:samsung_store run setblock -40 100 -26 minecraft:oak_wall_sign[facing=east]{front_text:{messages:[{"text":"Launch One UI",color:red,bold:true},{"text":""},{"text":""},{"text":""}]},back_text:{messages:[{"text":"Checkout #1",color:green,bold:true},{"text":""},{"text":""},{"text":""}]}}
execute in samsung:samsung_store if score #tablets_unlocked value matches 1.. run fill -39 99 -20 -34 99 -25 minecraft:light_blue_concrete
execute in samsung:samsung_store if score #tablets_unlocked value matches 1.. run setblock -36 100 -21 minecraft:command_block{Command:"function samsung:make_tablet"}
execute in samsung:samsung_store if score #tablets_unlocked value matches 1.. run setblock -36 101 -21 oak_button[face=floor,facing=west]
execute in samsung:samsung_store if score #tablets_unlocked value matches 1.. run setblock -35 100 -21 minecraft:oak_wall_sign[facing=east]{front_text:{messages:[{"text":"Make Tablet",color:yellow,bold:true},{"text":"",color:green,bold:true},{"text":"",color:green,bold:true},{"text":"",color:green,bold:true}]}}
execute in samsung:samsung_store if score #tablets_unlocked value matches 1.. run setblock -36 100 -23 minecraft:command_block{Command:"execute as @p run function samsung:sell_tablet"}
execute in samsung:samsung_store if score #tablets_unlocked value matches 1.. run setblock -36 101 -23 oak_button[face=floor,facing=west]
execute in samsung:samsung_store if score #tablets_unlocked value matches 1.. run setblock -35 100 -23 minecraft:oak_wall_sign[facing=east]{front_text:{messages:[{"text":"Sell Tablet",color:green,bold:true},{"text":"",color:green,bold:true},{"text":"",color:green,bold:true},{"text":"",color:green,bold:true}]}}
execute in samsung:samsung_store if score #servers_tier value matches 1.. in samsung:samsung_store run function samsung:generation/generate_servers
execute in samsung:samsung_store run forceload remove -51 -31 -31 -15
#execute in samsung:samsung_store run forceload add 21 11
#execute in samsung:samsung_store run setblock 18 100 6 minecraft:command_block{Command:"execute as @p run function samsung:unlock_wardrobe"}
#execute in samsung:samsung_store run setblock 18 101 6 oak_button[facing=east,face=floor]
#execute in samsung:samsung_store run setblock 17 100 6 minecraft:oak_wall_sign[facing=west]{front_text:{messages:[{"text":"Unlock",color:green,bold:true},{"text":"Wardrobe",color:green,bold:true},{"text":"Cost:500",color:green,bold:true},{"text":"Money",color:green,bold:true}]}}
#execute in samsung:samsung_store run forceload remove 21 11