Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local plr = game:GetService("Players").LocalPlayer
- local key = plr.UserId
- -- localScript
- -- Put here places like "game.StarterGui" or "game.Workspace", where is every gui that you going to use.
- local ondeGuis = {}
- -- Put script at StarterPlayerScripts
- local permitidos = {"BubbleChat" .. " " .. key, "Chat" .. " " .. key}
- function kick(quem)
- quem:Kick("You was Kicked from this game For Hacking.")
- end
- function securanca(key,onde)
- for i,v in pairs(onde:GetDescendants()) do
- table.insert(permitidos,v.Name .. " " .. key)
- end
- end
- function check(quem,key)
- for i=1,#permitidos do
- local estaPermitido = permitidos[i] == quem.Name .. " " .. key
- if estaPermitido then
- return true
- end
- end
- end
- function permitir()
- securanca(key,plr.PlayerGui:FindFirstChild("BubbleChat"))
- securanca(key,plr.PlayerGui:FindFirstChild("Chat"))
- for i=1,#ondeGuis do
- securanca(key,ondeGuis[i])
- end
- end
- local plrnome = plr.Name
- game.Workspace:WaitForChild(plrnome)
- wait(2)
- permitir()
- plr.PlayerGui.DescendantAdded:connect(function(des)
- if plr.Character then
- local ok = check(des,key)
- if not ok then
- kick(plr)
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement