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
 

Re: A better way to do this?

Previous Thread :: Next Thread 
waverlycole is not online. waverlycole
Joined: 30 Nov 2010
Total Posts: 139
19 Jul 2016 10:53 AM
Its a local script inside StarterPack.

plr = script.Parent.Parent


script.Parent.ChildAdded:connect(function(obj)
if (obj.Name ~= 'Assets') then
if (obj.Name ~= 'RC7') then
if (obj.Name ~= 'Tools') then
if (obj.Name ~= 'EpicTool') then
if (obj.Name ~= 'GrappleCrossBow') then
if (obj.Name ~= 'GravityCoil') then
if (obj.Name ~= 'InvisibilityPotion') then
if (obj.Name ~= 'SpeedCoil') then
if (obj.Name ~= 'SpeedGravityCoil') then
if (obj.Name ~= 'SpectateGuiLocalScript') then
if (obj.Parent == script.Parent) then
plr:Kick("Unverified Tool: "..obj.Name)
end
end
end
end
end
end
end
end
end
end
end
end)


Report Abuse
BothAngles is not online. BothAngles
Joined: 01 Dec 2011
Total Posts: 9604
19 Jul 2016 10:57 AM
Two ways

-- 1
local plr = script.Parent.Parent
local allowedTools = {
'Assets',
'RC7',
'Tools',
'EpicTool',
'GrappleCrossBow',
'GravityCoil',
'InvisibilityPotion',
'SpeedCoil',
'SpeedGravityCoil',
'SpectateGuiLocalScript',
}

function isValidTool(toolName)
for i,v in pairs(allowedTools) do
if toolName == v.Name then
return true
end
end
end

script.Parent.ChildAdded:connect(function(obj)
if not isValidTool(obj.Name) then
plr:Kick("Unverified Tool: "..obj.Name)
end
end)




-- 2
local plr = script.Parent.Parent
local allowedTools = {
['Assets'] = true,
['RC7'] = true,
['Tools'] = true,
['EpicTool'] = true,
['GrappleCrossBow'] = true,
['GravityCoil'] = true,
['InvisibilityPotion'] = true,
['SpeedCoil'] = true,
['SpeedGravityCoil'] = true,
['SpectateGuiLocalScript'] = true,
}

script.Parent.ChildAdded:connect(function(obj)
if not allowedTools[obj.Name] then
plr:Kick("Unverified Tool: "..obj.Name)
end
end)
Report Abuse
GamerGeorge101 is not online. GamerGeorge101
Joined: 20 Jul 2012
Total Posts: 3582
19 Jul 2016 10:57 AM
script.Parent.ChildAdded:connect(function(obj)
if (obj.Name ~= 'Assets') then
if (obj.Name ~= 'RC7') then
if (obj.Name ~= 'Tools') then
if (obj.Name ~= 'EpicTool') then
if (obj.Name ~= 'GrappleCrossBow') then
if (obj.Name ~= 'GravityCoil') then
if (obj.Name ~= 'InvisibilityPotion') then
if (obj.Name ~= 'SpeedCoil') then
if (obj.Name ~= 'SpeedGravityCoil') then
if (obj.Name ~= 'SpectateGuiLocalScript') then
if (obj.Parent == script.Parent) then
plr:Kick("Unverified Tool: "..obj.Name)
end
end
end
end
end
end
end
end
end
end
end
end)

thats the only way


this is not a signature
Report Abuse
lululukas is not online. lululukas
Joined: 23 Aug 2010
Total Posts: 1043
19 Jul 2016 11:37 AM
plr=script.Parent.Parent

t={"Assets","RC7","Tools","EpicTool","GrappleCrossBow","GravityCoil","InvisibilityPotion","SpeedCoil","SpeedGravityCoil","SpectateGuiLocalScript"}

for i,v in pairs(t) do
if obj.Name~=t and obj.Parent==script.Parent then
plr:Kick("Unverified Tool: "..obj.Name)
end
end



Report Abuse
pketny is not online. pketny
Joined: 27 Dec 2010
Total Posts: 1162
19 Jul 2016 11:41 AM
BothAngles' second way is the best way, however, this script should not be a local script since running this locally is insecure and easily hack-able.
Report Abuse
lululukas is not online. lululukas
Joined: 23 Aug 2010
Total Posts: 1043
19 Jul 2016 11:43 AM
@pket

It makes absolutely no difference whether you run it in a local script or a local script in terms of it being hackable. They can delete both server scripts and local scripts if its not filtering enabled.


Report Abuse
lululukas is not online. lululukas
Joined: 23 Aug 2010
Total Posts: 1043
19 Jul 2016 11:44 AM
in a local script or a server script*


Report Abuse
pketny is not online. pketny
Joined: 27 Dec 2010
Total Posts: 1162
19 Jul 2016 11:54 AM
@lululukas
A local script always runs 'locally' on the player's computer. A script always runs on the ROBLOX server. Local scripts can be manipulated easily by simply editing assembly with a debugger on your PC, however for sever sided scripts to be manipulated, FilteringEnabled must be turned off AND the player must have written an exploit with which he gains access to the server through his client(because when the client makes changes the server copies it), which is more difficult. Not impossible, just more difficult.

Why would you make it easier for hackers?
Make everything as secure as possible.
Report Abuse
lululukas is not online. lululukas
Joined: 23 Aug 2010
Total Posts: 1043
19 Jul 2016 01:43 PM
It doesn't make it easier at all. Removing a server script or a local script are one and the same. It doesn't require more or less access. You want to sound smart but in reality you don't know what you're talking about.


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