I want this VIP weapons script, but I want to add a line that makes it work if you have a VIP t-shirt. I know how to t-shirt texture and stuff works, I was just wondering if there is more to it then just adding 'texture = '.
If you could just add it into this script it would be very much appreciated.
-- Ajedi32
bin = script.Parent
VIPs = {"Player"} -- Change this to whatever u want.
function getWeapons()
print("Get Weapons")
local children = bin:getChildren()
local weapon = {}
for i=1,#children do
if (children[i].className == "Tool" or children[i].className == "HopperBin") then
table.insert(weapon, children[i]:clone())
children[i]:remove()
end
end
for i=1,#weapon do
print(weapon[i].Name)
end
return weapon
end
function getPermision(name)
for i=1,#VIPs do
if (string.lower(name) == string.lower(VIPs[i])) then return true end
end
return false
end
function getCharacter(Player)
return game.Workspace:findFirstChild(Player.Name)
end
function getPlayer(Character)
return game.Players:findFirstChild(Character.Name)
end
weapons = getWeapons()
function NewObject(object)
if (object:findFirstChild("Humanoid") ~= nil) then
print("New Humanoid")
if (getPlayer(object) ~= nil) then
print("Player Respawned")
if getPermision(object.Name) then
for i=1,#weapons do
local w = weapons[i]:clone()
w.Parent = getPlayer(object).Backpack
end
end
end
end
end
game.Workspace.ChildAdded:connect(NewObject) |