Autreus
|
  |
| Joined: 27 Feb 2015 |
| Total Posts: 290 |
|
|
| 17 Jul 2016 06:56 AM |
admins = {"Autreus","SomeoneElse"} banned = {"Someone"} Bet=":" game.Players.ChildAdded:connect(function(plr) for i.v in pairs(banned) do if v.Name==banned then v:Kick() end; end; end); for a,x in pairs(admins) do plr.Chatted:connect(function(msg) if msg==(Bet.."ff me") then Instance.new('ForceField', game.Players.LocalPlayer.Character) elseif msg==(Bet.."god me") then game.Players.LocalPlayer.Character.Character.Humanoid.MaxHealth=math.huge; end; end) end;
Correct me whatever I'm doing wrong, this does not seem to work.. |
|
|
| Report Abuse |
|
|
Autreus
|
  |
| Joined: 27 Feb 2015 |
| Total Posts: 290 |
|
| |
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 17 Jul 2016 07:37 AM |
You are handling this from a local script. You need to use it in a server script. Look up a admin script and see how they do it.
|
|
|
| Report Abuse |
|
|
Autreus
|
  |
| Joined: 27 Feb 2015 |
| Total Posts: 290 |
|
|
| 17 Jul 2016 07:43 AM |
| Are there any tutorials you can link me? I can't seem to find out, and this took me a while to write. :/ |
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 17 Jul 2016 08:10 AM |
--server script
local admins = {"Autreus","SomeoneElse"} local banned = {"Someone"} local commands = {'ff','ban','god'} local prefix = ':'
GetCommand = function(msg) for i,v in next, commands do if msg:sub(3,3+#v) == v then --get the message after a space return v end end end
game.Players.PlayersAdded:connect(function(plr) for i,v in next, banned do if plr.Name == v then plr:Kick() end end for i,v in next, admins do if plr.Name == v then plr.Chatted:connect(function(msg) if msg:sub(1,1) == prefix then if GetCommand(msg) == 'ff' then --other stuff that im too lazy to do for you elseif GetCommand(msg) == 'ban' then --other stuff that im too lazy to do for you [2] elseif ... ... end end end) end end end)
|
|
|
| Report Abuse |
|
|
Autreus
|
  |
| Joined: 27 Feb 2015 |
| Total Posts: 290 |
|
|
| 17 Jul 2016 08:11 AM |
What is a serverscript? I searched "ServerScript" in Andvanced Objects.. Nothing came up.
|
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 17 Jul 2016 08:12 AM |
*sigh*
http://prntscr.com/btyo8r
|
|
|
| Report Abuse |
|
|
|
| 17 Jul 2016 08:14 AM |
or put it on StarterCharacterScripts
R$30 |
|
|
| Report Abuse |
|
|