Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local messagingService = game:GetService("MessagingService")
- local connection
- function event(message)
- local eventName = message["Data"]
- if eventName == "purple" then
- game.Workspace.Part.BrickColor = BrickColor.new("Bright violet")
- elseif eventName == "blue" then
- game.Workspace.Part.BrickColor = BrickColor.new("Baby blue")
- end
- connection:Disconnect()
- wait(10)
- establishConnection()
- end
- function establishConnection()
- connection = messagingService:SubscribeAsync("event", event)
- end
- establishConnection()
- --[[
- local message = {
- ["Data"] = "purple",
- ["Sent"] = 16615115.161
- }
- ]]
Advertisement
Add Comment
Please, Sign In to add comment