Here is the code:

server = nil -- Mutes warnings about unknown globals
service = nil
return function()
	server.Commands.Gun = {
			Prefix = server.Settings.Prefix; 
			Commands = {"gun"}; 
			Args = {"player"}; 
			Description = "The said player gets a gun."; 
			Fun = true; 
			Hidden = false; -- 
			AdminLevel = "Moderators"; 
			Function = function(plr,args) 
				for i,p in pairs(service.GetPlayers(plr,args[1])) do 
					game:GetService("InsertService"):LoadAsset(116693764).Parent = plr.Backpack			
			end
		end
	}
end

7 comments

0

Why are you using global variables? Use local variables. They're like vegetables, they're good for u

0

What variables should I change to local variables

0

All of them

0

In fact, never use global variables. There is no use for them.

0

How does that even help?

0

When I say :gun in the chat it doesn't do nothing, it doesn't even give me an error