-- zipperipper's script

Bin = script.Parent

function onButton1Down(mouse)

mt = mouse.Target	

		if mt.Locked == false then
		mt.BrickColor = BrickColor.Random(1,268)

	end

end

function onSelected(mouse)
mouse.Icon = "rbxasset://textures\\GunCursor.png"
mouse.Button1Down:connect(function() onButton1Down(mouse) end)

local Message = Instance.new("Hint")

Message.Parent = Bin.Parent.Parent

Message.Text = "Click on a brick to change it to a random color!"

end

function onDeS(mouse) 
script.Parent.Parent.Parent.Message:remove() 
end 

script.Parent.Deselected:connect(onDeS)
Bin.Selected:connect(onSelected) 
