Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local hint=Instance.new("Hint",workspace)
- local msg1="Now using SLock by Dev_Basics"
- local msg2="This now means that players cannot join this server"
- local msg3="To prevent specific players from getting kick add them to the whitelist"
- local msg3="type 'whitelist/playername' to add a player to the whitelist"
- local msg4="To disable Slock type 'slock/on'"
- local msg5="Thank you for using Slock by Dev_Basics"
- local whitelist={}
- local slockenabled=true
- local num=1
- hint.Text=msg1
- wait(5)
- hint.Text=msg2
- wait(5)
- hint.Text=msg3
- wait(5)
- hint.Text=msg4
- wait(5)
- hint.Text=msg5
- game.Players.ChildAdded:Connect(function(player)
- if slockenabled and not whitelist[player.Name] then
- hint.Text=player.Name.." attempted to join the server"
- workspace[player.Name]:Destroy()
- end
- end)
- for _,player in pairs(game.Players:GetPlayers()) do
- player.Chatted:Connect(function(msg)
- if string.sub(msg, 1, 10) == "whitelist/" then
- whitelist[#whitelist+1]=string.sub(msg, 11)
- elseif string.sub(msg, 1, 6) == "slock/" then
- local txt=string.sub(msg, 7)
- if txt == "off" then slockenabled=false end
- end
- end)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement