generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Creating an Admin Script?

Previous Thread :: Next Thread 
goofers is not online. goofers
Joined: 02 Jul 2010
Total Posts: 9
13 May 2014 03:31 PM
I don't want Kohl's or Person299's. I want to know the basics to CREATING one.
Report Abuse
SenseiWarrior is not online. SenseiWarrior
Joined: 09 Apr 2011
Total Posts: 12140
13 May 2014 03:35 PM
admin = {}
banned = {}

function isAdmin(name)
for _, v in pairs(admin) do
if v = name then
return true
end
end
end

function isBanned(nam)
for _, v in pairs(banned do
if v = nam then
return true
end
end
end

game.Players.PlayerAdded:connect(function(player)
if isBanned(player.Name) then
player:Kick()
elseif isAdmin(player.Name) then
player.Chatted:connect(function(msg,rec)
if string.sub(msg,1,5) == "kill/" then
local plr = game.Players:FindFirstChild(string.sub(msg,6)
if plr then
plr.Character.Humanoid.Health = 0
end
elseif string.sub(msg,1,#) == "command" then
local plr = game.Players:FindFirstChild(string.sub(msg,#)
if plr then

end
end
end)
end
end)
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image