Way to remove admin

Is there a way to remove the admin only on some LUA scripts so they’ll be able to be used by non admins on servers too?


if !self:GetOwner():IsAdmin() && !self:GetOwner():IsSuperAdmin() then
self:GetOwner():PrintMessage(HUD_PRINTTALK, "Sorry, this tool is admin-only.")

If I remove that entire line, the prop in question wont spawn at all, except in single player. Is there a way around this?

You will have to post more code than that, seeing as this is only a message to the user.


//-----------
//Main function
//-----------

function TOOL:LeftClick(trace)

if !self:GetOwner():IsAdmin() && !self:GetOwner():IsSuperAdmin() then
self:GetOwner():PrintMessage(HUD_PRINTTALK, "Sorry, this tool is admin-only.")
return end

if (SERVER) then

	local sent = ents.Create("sent_earthquake")
	sent:SetPos(trace.HitPos + Vector(0,0,10))
	sent:Spawn() 
         blah blah blah

I have yet to try to change all the “if (SERVER)” to “if (CLIENT)”
But I doubt it’s that simple. I have no clue about LUA to be honest, just doing this to learn.

remove all of this:

[lua]if !self:GetOwner():IsAdmin() && !self:GetOwner():IsSuperAdmin() then
self:GetOwner():PrintMessage(HUD_PRINTTALK, “Sorry, this tool is admin-only.”)
return end
[/lua]

The part that causes the script to end is “return”. If you simply remove the word return, it will still display the message, but the script will still run.