local hrs = {"zaniac10","NotTheTacos","derocket33","Player"}
local db = false
script.Parent.Touched:connect(function(hit)
if db == true then return; end
for i,v in pairs(hrs) do
if hit.Parent.Name == v then
db = true
script.Parent.Transparency = 0.6
script.Parent.CanCollide = false
wait(1)
script.Parent.Transparency = 0
script.Parent.CanCollide = true
db = false
else
if hit.Parent:IsA("Hat") then
if hit.Parent.Parent.Name == v then
db = true
script.Parent.Transparency = 0.6
script.Parent.CanCollide = false
wait(1)
script.Parent.Transparency = 0
script.Parent.CanCollide = true
db = false
end
end
print("Player not in table, ending function.")
end
end
end)
I stink at scripting, so I'm proud of this, so I decided to post it here woot |