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 » Scripters
Home Search
 

Help

Previous Thread :: Next Thread 
Autreus is not online. 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 is not online. Autreus
Joined: 27 Feb 2015
Total Posts: 290
17 Jul 2016 07:05 AM
1
Report Abuse
TimeTicks is not online. 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 is not online. 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 is not online. 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 is not online. 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 is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
17 Jul 2016 08:12 AM
*sigh*

http://prntscr.com/btyo8r


Report Abuse
Creatorworld is not online. Creatorworld
Joined: 26 Dec 2013
Total Posts: 492
17 Jul 2016 08:14 AM
or put it on StarterCharacterScripts


R$30
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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