Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local door = workspace.FirstBox
- local GroupId = -- your group id
- local MinRank = -- min rank the player needs
- game.Players.PlayerAdded:Connect(function(player)
- player.Chatted:Connect(function(msg)
- if player:GetRankInGroup(GroupId) >= MinRank then
- for i,v in pairs(door:GetChildren()) do
- if string.sub(msg,1,6) == "/lock1" and v:IsA("Part") then
- v.CanCollide = true
- v.Transparency = .8
- elseif string.sub(msg,1,8) == "/unlock1" and v:IsA("Part") then
- v.CanCollide = false
- v.Transparency = 1
- end
- end
- end
- end)
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement