Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Scripted by :lameckluiz --
- --[[Chatlog Sytem]]--
- --//Variables
- local Players = game:GetService("Players")
- local HttpService = game:GetService("HttpService")
- local disabled = false
- local DisCommand = false
- local groupid = 4961761
- local grouprank = 255
- local group = true
- local webhook = "https://discordapp.com/api/webhooks/651808243328221184/YTIeKrR6cl52ufpR4mNziJhW3hQUg-L_wblKmKWjyA1AqosLVL-9ODYAXZGgEs4aao6o"
- local access = {"Player1","Player2","Player3"}
- local Command1 = ":chat on"
- local Command2 = "/e :chat on"
- local Command3 = ":chat off"
- local Command4 = "/e :chat off"
- --// Functions/Runners
- function contains(plrname)
- for _, v in pairs(access) do
- if v == plrname then return true end
- end
- return false
- end
- Players.PlayerAdded:Connect(function(plr)
- plr.Chatted:Connect(function(msg)
- if disabled == false then
- if DisCommand == false then
- local data = {
- content = msg;
- username = plr.Name .. " - (#" .. plr.UserId .. ")";
- avatar_url = "http://www.roblox.com/Thumbs/Avatar.ashx?x=100&y=100&Format=Png&userId="..plr.UserId
- }
- HttpService:PostAsync(webhook, HttpService:JSONEncode(data))
- elseif DisCommand == true then
- if msg ~= Command1 and msg ~= Command2 and msg ~= Command3 and msg ~= Command4 then
- local data = {
- content = msg;
- username = plr.Name .. " - (#" .. plr.UserId .. ")";
- avatar_url = "http://www.roblox.com/Thumbs/Avatar.ashx?x=100&y=100&Format=Png&userId="..plr.UserId
- }
- HttpService:PostAsync(webhook, HttpService:JSONEncode(data))
- end
- end
- end
- end)
- end)
- Players.PlayerAdded:connect(function(Player)
- if group == true then
- if Player:GetRankInGroup(groupid) >= grouprank then
- Player.Chatted:Connect(function(msg)
- if msg:lower() == Command1 or msg:lower() == Command2 then
- disabled = false
- print("Chat logs activated")
- end
- if msg:lower() == Command3 or msg:lower() == Command4 then
- disabled = true
- print("Chat logs deactivated")
- end
- end)
- end
- elseif group == false then
- if contains(Player.Name) then
- Player.Chatted:Connect(function(msg)
- if msg:lower() == Command1 or msg:lower() == Command2 then
- disabled = false
- print("Chat logs activated")
- end
- if msg:lower() == Command3 or msg:lower() == Command4 then
- disabled = true
- print("Chat logs deactivated")
- end
- end)
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement