Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Hi, I have returned.
- -- After many years, I have learned LUA by myself, no educations, no helpers, by myself.
- -- In this Paste contains a Script to restricts any players that you listed inside this script from joining your Roblox Game in Roblox Studio.
- -- It is simple. Try to modify some variables if you want even more fun.
- local Blacklisted = { -- Add as many Player name as you want. Must be Player's Username.
- "PlayerOne",
- "PlayerTwo",
- "PlayerThree"
- }
- local Reason = "You're suck" -- Modify if you want, change it to "" or nil to disable it.
- local RandomReason = false -- Set it true if you want your Kick Reason to be randomized. Must set global Reason to nil.
- local Reasons = { -- Change Reasons in this table so it can be randomized (if you set RandomReason "true").
- "Noob",
- "Get kicked",
- "Not my type"
- }
- -- The process of restricting blacklisted players from joining starts here.
- game.Players.PlayerAdded:Connect(function(p)
- for _, v in pairs(Blacklisted) do
- if p.Name == v then
- if Reason ~= nil then
- p:Kick(Reason)
- else
- local a = Reasons[math.random(1,#Reasons)]
- p:Kick(a)
- end
- end
- end
- end)
- print("Blacklister has no errors and runs perfectly fine.") -- Prints a message into output to ensure the script runs with no errors.
Advertisement
Add Comment
Please, Sign In to add comment