Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- G L A D E
- A D M I N
- ]]--
- local cmds = {
- {
- Cmd = "print",
- Callback = function(args)
- print("hello")
- end
- }
- }
- function addMsg(message, player)
- local msg = nil
- if string.len(message) >= 3 then return true end
- if string.sub(message, 1, 3) == "gl/" then
- msg = string.sub(message, 4)
- end
- for i,v in pairs(cmds) do
- if string.sub(msg, 1, string.len(v.Cmd)) == v.Cmd then
- v.Callback({
- Author = player,
- MessageLeft = string.sub(msg, string.len(v.Cmd) + 1)
- })
- end
- end
- end
- game.Players.PlayerAdded:connect(function(plr)
- plr.Chatted:connect(function(msg)
- addMsg(msg, plr)
- end)
- local msg = Instance.new("Message", Workspace)
- msg.Text = "[Glade Admin] "..plr.Name.." has joined"
- wait(2.5)
- msg:Destroy()
- end)
- game.Players.PlayerRemoving:connect(function(plr)
- local msg = Instance.new("Message", Workspace)
- msg.Text = "[Glade Admin] "..plr.Name.." has left"
- wait(2.5)
- msg:Destroy()
- end)
- for i,v in pairs(game.Players:GetChildren()) do
- v.Chatted:connect(function(msg)
- addMsg(msg, v)
- end)
- end
- local l = Instance.new("Hint", game.Workspace)
- l.Text = "Glade Admin has been loaded in this server!"
- wait(2.5)
- l:Destroy()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement