Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Anaminus
- permission = {"baxterknite", "nights192", "fraklepop", ".steve3953", "....", "....."} -- Put in the names of the people allowed to spawn a teapot turret giver
- function check(player)
- if table.maxn(permission)==0 then return true end--Remove all names from permission to allow all players to use.
- for i = 1,#permission do
- if string.lower(player.Name)==string.lower(permission[i]) then return true end
- end
- return false
- end
- function onPlayerRespawned(newPlayer)
- if (newPlayer == nil) then return end
- if not check(newPlayer) then return end
- local w = game.Lighting:GetChildren()
- for i = 1,#w do
- if w[i].Name == "Spawner" then
- w[i]:Clone().Parent = newPlayer.Backpack
- end
- end
- end
- function onPlayerEntered(newPlayer)
- newPlayer.Changed:connect(function (property)
- if (property == "Character") then
- onPlayerRespawned(newPlayer)
- end
- end)
- end
- game.Players.PlayerAdded:connect(onPlayerEntered)
Advertisement
Add Comment
Please, Sign In to add comment