Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Admin script made by subsallaround.
- admins = {"subsallaround"}
- table.insert(admins,owner.Name)
- function isAdmin(plr)
- for i,v in pairs(admins) do
- if v.Name:lower() == plr.Name:lower() then
- return true
- else
- return false
- end
- end
- end
- player = owner
- speaker = player
- player.Chatted:Connect(function(text)
- print(owner.Name)
- local function findPlayer(name)
- name = string.lower(name)
- if name == 'me' then
- return owner
- end
- for i,v in pairs(game:GetService'Players':GetPlayers()) do
- if v.Name:lower():find(name) == 1 then
- return v
- end
- end
- end
- speak = player
- if isAdmin(owner) then
- if string.sub(text,0,2):lower() == "m " then
- local m = Instance.new("Message", workspace)
- m.Text = "Message from "..speak.Name.." - "..string.sub(text,3)
- end
- if string.sub(text,0,5):lower() == "/e m " then
- local m = Instance.new("Message", workspace)
- m.Text = "Message from "..speak.Name.." - "..string.sub(text,6)
- wait(5)
- m:Remove()
- end
- if string.sub(text,0,6):lower() == "admin " then
- local plr = findPlayer(string.sub(text,7))
- table.insert(admins,plr.Name)
- local h = Instance.new("Hint", workspace)
- h.Text = plr.Name.." is now an admin"
- wait(2)
- h:Remove()
- end
- if string.sub(text,0,8):lower() == "/e admin " then
- local plr = findPlayer(string.sub(text,9))
- table.insert(admins,plr.Name)
- local h = Instance.new("Hint", workspace)
- h.Text = plr.Name.." is now an admin"
- wait(2)
- h:Remove()
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement