Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- script:local message = "dog man" --- change this to whatever you want your trigger to be
- local door = script.Parent
- function onChatted(msg, recipient, speaker)
- local source = string.lower(speaker.Name)
- msg = string.lower(msg)
- if (msg == message) then
- door.CanCollide = false
- for i = 1, 9 do
- door.Transparency = door.Transparency + 0.1
- wait()
- end
- wait(5)
- for i = 1, 9 do
- door.Transparency = door.Transparency - 0.1
- wait()
- end
- door.CanCollide = true
- end
- end
- function onPlayerEntered(newPlayer)
- newPlayer.Chatted:connect(function(msg, recipient) onChatted(msg, recipient, newPlayer) end)
- end
- game.Players.PlayerAdded:connect(onPlayerEntered)
- Note: Insert script into the object you want.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement