NoobyDudeS

Player Blocklist (Roblox Studio, Simple)

Nov 25th, 2025
724
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.42 KB | None | 0 0
  1. -- Hi, I have returned.
  2. -- After many years, I have learned LUA by myself, no educations, no helpers, by myself.
  3. -- In this Paste contains a Script to restricts any players that you listed inside this script from joining your Roblox Game in Roblox Studio.
  4. -- It is simple. Try to modify some variables if you want even more fun.
  5.  
  6. local Blacklisted = { -- Add as many Player name as you want. Must be Player's Username.
  7.     "PlayerOne",
  8.     "PlayerTwo",
  9.     "PlayerThree"
  10. }
  11.  
  12. local Reason = "You're suck" -- Modify if you want, change it to "" or nil to disable it.
  13. local RandomReason = false -- Set it true if you want your Kick Reason to be randomized. Must set global Reason to nil.
  14.  
  15. local Reasons = { -- Change Reasons in this table so it can be randomized (if you set RandomReason "true").
  16.     "Noob",
  17.     "Get kicked",
  18.     "Not my type"
  19. }
  20.  
  21. -- The process of restricting blacklisted players from joining starts here.
  22.  
  23. game.Players.PlayerAdded:Connect(function(p)
  24.         for _, v in pairs(Blacklisted) do
  25.             if p.Name == v then
  26.                 if Reason ~= nil then
  27.                     p:Kick(Reason)
  28.                 else
  29.                     local a = Reasons[math.random(1,#Reasons)]
  30.                     p:Kick(a)
  31.                 end
  32.             end
  33.         end
  34. end)
  35.  
  36. 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