Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local datastore = game:GetService("DataStoreService")
- local players = game:GetService("Players")
- local serverstorage = game:GetService("ServerStorage")
- local modules = serverstorage.modules
- local commands = serverstorage.commands
- local whitelists = require(modules.whitelists)
- local admindata = datastore:GetDataStore("admins")
- local bandata = datastore:GetDataStore("bans")
- _G.fetchplayer = modules.fetchtarget
- _G.sban = {}
- players.PlayerAdded:Connect(function(player)
- local banned = bandata:GetAsync(player.UserId)
- if banned and banned[1] == true then
- player:Kick("You are banned for"..banned[2]..".")
- end
- if table.find(_G.sban, player.UserId) then
- player:Kick("You are server banned.")
- end
- if table.find(whitelists, player.UserId) or admindata:GetAsync(player.UserId) == true then
- player.Chatted:Connect(function(message)
- local arguments = message:split(" ")
- if arguments[1]:find("/") then
- local command = commands:FindFirstChild(arguments[1]:gsub("/", ""):lower())
- if command then
- require(command).run(player, message, arguments)
- end
- end
- end)
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement