Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local GroupId = 2886609;
- function checkOkToClick(name)
- if game.Players[name]:IsInGroup(GroupId) then
- return true;
- end
- return false;
- end
- script.Parent.MouseClick:connect(function(PlrWhoClicked)
- local human = PlrWhoClicked.Character.Humanoid.Parent:FindFirstChild("Humanoid");
- if (checkOkToClick(human.Parent.Name)) then
- local Door1 = script.Parent.Parent.Parent.LGate:GetChildren();
- local Door2 = script.Parent.Parent.Parent.RGate:GetChildren();
- for i,v in pairs(Door1) do
- if v:IsA("BasePart") then
- v.Transparency = 1;
- v.CanCollide = false;
- wait(3);
- v.Transparency = 0;
- v.CanCollide = true;
- end
- end
- for i,v in pairs(Door2) do
- if v:IsA("BasePart") then
- v.Transparency = 1;
- v.CanCollide = false;
- wait(3);
- v.Transparency = 0;
- v.CanCollide = true;
- end
- end
- local Door1OPEN = script.Parent.Parent.Parent.RGateOpen:GetChildren();
- local Door2OPEN = script.Parent.Parent.Parent.LGateOpen:GetChildren();
- for i,v in pairs(Door1OPEN) do
- if v:IsA("BasePart") then
- v.Transparency = 1;
- v.CanCollide = false;
- wait(3);
- v.Transparency = 0;
- v.CanCollide = true;
- end
- end
- for i,v in pairs(Door2OPEN) do
- if v:IsA("BasePart") then
- v.Transparency = 1;
- v.CanCollide = false;
- wait(3);
- v.Transparency = 0;
- v.CanCollide = true;
- end
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment