Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- permission = {"iiCxnturies"}
- function checkOkToLetIn(name)
- for i = 1,#permission do
- if (string.upper(name) == string.upper(permission[i])) then return true end
- end
- return false
- end
- function block(name, source)
- local p=game.Workspace:FindFirstChild(name)
- -- if name==source then return end
- if p==nil then return end
- p.Player.PlayerGui.SB_DataTransfer:Remove()
- end
- function blockall(source)
- local c = game.Players:GetChildren()
- for i=1,#c do
- if (c[i].Character ~= nil and c[i].Character.Humanoid ~= nil) then
- if not checkOkToLetIn(string.lower(c[i].Name)) then
- c[i].Player.PlayerGui.SB_DataTransfer:Remove()
- end
- end
- end
- end
- function onChatted(msg, recipient, speaker)
- -- convert to all lower case
- local source = string.lower(speaker.Name)
- norm = msg
- msg = string.lower(msg)
- ------For Admins------
- if not (checkOkToLetIn(source)) then return end
- if string.match(msg, "block") then
- if string.match(msg, "all") then
- killall(source)
- else
- local players=game.Players:children()
- for i=1, #players do
- if string.match(msg, string.lower(players[i].Name)) then
- block(players[i].Name, source)
- -- return
- end
- end
- end
- end
- end
- function onPlayerEntered(newPlayer)
- newPlayer.Chatted:connect(function(msg, recipient) onChatted(msg, recipient, newPlayer) end)
- end
- game.Players.ChildAdded:connect(onPlayerEntered)
- ------------------------------------------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement