Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Alle variabler
- local Spawner_ZombieP = "1"
- local Spawner_Blaze = "2"
- local Spawner_Spider = "3"
- local Spawner_Enderman = "4"
- local Spawner_Slime = "5"
- local Spawner_Skeleton = "6"
- local Spawner_Witch = "7"
- --Toggle variabler
- local ZombieP_state = 0
- local Blaze_state = 0
- local Spider_state = 0
- local Enderman_state = 0
- local Slime_state = 0
- local Skeleton_state = 0
- local Witch_state = 0
- rednet.open("back")
- while true do
- term.clear()
- term.setCursorPos(1,1)
- print("Programmer:")
- if ZombieP_state == 0 then print("1. Skru PÅ Zombie Piglin spawner")
- elseif ZombieP_state == 1 then print("1. Skru AV Zombie Piglin spawner")
- end
- if Blaze_state == 0 then print("2. Skru PÅ Blaze spawner")
- elseif Blaze_state == 1 then print("2. Skru AV Blaze spawner")
- end
- if Spider_state == 0 then print("3. Skru PÅ Spider spawner")
- elseif Spider_state == 1 then print("3. Skru AV Spider spawner")
- end
- if Enderman_state == 0 then print("4. Skru PÅ Enderman spawner")
- elseif Enderman_state == 1 then print("4. Skru AV Enderman spawner")
- end
- if Slime_state == 0 then print("5. Skru PÅ Slime spawner")
- elseif Slime_state == 1 then print("5. Skru AV Slime spawner")
- end
- if Skeleton_state == 0 then print("6. Skru PÅ Skeleton spawner")
- elseif Skeleton_state == 1 then print("6. Skru AV Skeleton spawner")
- end
- if Witch_state == 0 then print("7. Skru PÅ Witch spawner")
- elseif Witch_state == 1 then print("7. Skru AV Witch spawner")
- end
- term.setCursorPos(1,15)
- write("Kjør program: ")
- UserInput = read()
- if UserInput == Spawner_ZombieP and ZombieP_state == 0 then
- term.clear()
- term.setCursorPos(1,1)
- rednet.broadcast("Spawner_ZombiePToggle")
- ZombieP_state = ZombieP_state + 1
- elseif UserInput == Spawner_ZombieP and ZombieP_state == 1 then
- term.clear()
- term.setCursorPos(1,1)
- rednet.broadcast("Spawner_ZombiePToggle")
- ZombieP_state = ZombieP_state - 1
- end
- if UserInput == Spawner_Blaze and Blaze_state == 0 then
- term.clear()
- term.setCursorPos(1,1)
- rednet.broadcast("Spawner_BlazeToggle")
- Blaze_state = Blaze_state + 1
- elseif UserInput == Spawner_Blaze and Blaze_state == 1 then
- term.clear()
- term.setCursorPos(1,1)
- rednet.broadcast("Spawner_BlazeToggle")
- Blaze_state = Blaze_state - 1
- end
- if UserInput == Spawner_Spider and Spider_state == 0 then
- term.clear()
- term.setCursorPos(1,1)
- rednet.broadcast("Spawner_SpiderToggle")
- Spider_state = Spider_state + 1
- elseif UserInput == Spawner_Spider and Spider_state == 1 then
- term.clear()
- term.setCursorPos(1,1)
- rednet.broadcast("Spawner_SpiderToggle")
- Spider_state = Spider_state - 1
- end
- if UserInput == Spawner_Enderman and Enderman_state == 0 then
- term.clear()
- term.setCursorPos(1,1)
- rednet.broadcast("Spawner_EndermanToggle")
- Enderman_state = Enderman_state + 1
- elseif UserInput == Spawner_Enderman and Enderman_state == 1 then
- term.clear()
- term.setCursorPos(1,1)
- rednet.broadcast("Spawner_EndermanToggle")
- Enderman_state = Enderman_state - 1
- end
- if UserInput == Spawner_Slime and Slime_state == 0 then
- term.clear()
- term.setCursorPos(1,1)
- rednet.broadcast("Spawner_SlimeToggle")
- Slime_state = Slime_state + 1
- elseif UserInput == Spawner_Slime and Slime_state == 1 then
- term.clear()
- term.setCursorPos(1,1)
- rednet.broadcast("Spawner_SlimeToggle")
- Slime_state = Slime_state - 1
- end
- if UserInput == Spawner_Skeleton and Skeleton_state == 0 then
- term.clear()
- term.setCursorPos(1,1)
- rednet.broadcast("Spawner_SkeletonToggle")
- Skeleton_state = Skeleton_state + 1
- elseif UserInput == Spawner_Skeleton and Skeleton_state == 1 then
- term.clear()
- term.setCursorPos(1,1)
- rednet.broadcast("Spawner_SkeletonToggle")
- Skeleton_state = Skeleton_state - 1
- end
- if UserInput == Spawner_Witch and Witch_state == 0 then
- term.clear()
- term.setCursorPos(1,1)
- rednet.broadcast("Spawner_WitchToggle")
- Witch_state = Witch_state + 1
- elseif UserInput == Spawner_Witch and Witch_state == 1 then
- term.clear()
- term.setCursorPos(1,1)
- rednet.broadcast("Spawner_WitchToggle")
- Witch_state = Witch_state - 1
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement