Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local range = 20
- local whitelist = {}
- if not commands then
- error("Not running on command computer")
- end
- local success, obj = commands.exec("scoreboard objectives list")
- if success == true then
- local found = false
- for i,v in pairs(obj) do
- if v == "Whitelisted33" then
- found = true
- end
- end
- if found == false then
- commands.execAsync("scoreboard objectives add Whitelisted33 dummy")
- end
- else
- commands.execAsync("scoreboard objectives add Whitelisted33 dummy")
- end
- for i,v in pairs(whitelist) do
- commands.execAsync("scoreboard players set "..v.." Whitelisted33 1")
- end
- while true do
- commands.execAsync("gamemode adventure @a[m=1,r="..range..",score_Whitelisted33=0]")
- commands.execAsync("gamemode adventure @a[m=0,r="..range..",score_Whitelisted33=0]")
- commands.execAsync("gamemode survival @a[rm="..range+(1)..",r="..range+(11)..",m=2,score_Whitelisted33=0]")
- sleep(0.5)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement