Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local module = {}
- local datastore = game:GetService("DataStoreService")
- local bandata = datastore:GetDataStore("bans")
- local players = game:GetService("Players")
- module.run = function(player, message, arguments)
- local userid = players:GetUserIdFromNameAsync(arguments[2])
- local reason = message:gsub(arguments[1].." "..arguments[2], "")
- bandata:SetAsync(userid, {true, reason})
- for _, v in pairs(players:GetPlayers()) do
- if v.Name:lower() == arguments[2]:lower() then
- v:Kick("You were banned for"..reason..".")
- end
- end
- end
- return module
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement