local w=game:GetService("\082\101\112\108\105\099\097\116\101\100\083\116\111\114\097\103\101")local j=require(w.Packages.Roact)local i=require(w.Packages.GooeyParticles)local b=i.RoactElement local c=j.PureComponent:extend("\084\101\115\116\069\109\105\116\116\101\114")function c.init(w)w:setState({hovered=false})end function c.render(w)return j.createElement("\084\101\120\116\066\117\116\116\111\110",{AnchorPoint=Vector2.new(.5,.5),BackgroundColor3=Color3.new(1,1,1),Font=Enum.Font.Gotham,Position=UDim2.fromScale(.5,.5),Size=UDim2.fromOffset(200,50);Text="\072\111\118\101\114 \111\118\101\114 \109\101\033",TextSize=20,ZIndex=2,[j.Event.MouseEnter]=function()w:setState({hovered=true})end;[j.Event.MouseLeave]=function()w:setState({hovered=false})end},{UICorner=j.createElement("\085\073\067\111\114\110\101\114",{CornerRadius=UDim.new(0,4)});Particles=j.createElement(b,{Enabled=w.state.hovered,Rotation=NumberRange.new(-360,360);Lifetime=NumberRange.new(.3,.5);Rate=40;Image="\114\098\120\097\115\115\101\116\105\100\058\047\047\054\051\049\057\057\053\049\055\048\056",Size=NumberSequence.new({NumberSequenceKeypoint.new(0,0),NumberSequenceKeypoint.new(1,100)}),Transparency=NumberSequence.new({NumberSequenceKeypoint.new(0,0);NumberSequenceKeypoint.new(1,1)});Color=ColorSequence.new({ColorSequenceKeypoint.new(0,Color3.new(1,1,1)),ColorSequenceKeypoint.new(1,Color3.new(1,1,0))})})})end return function(w)local i=j.mount(j.createElement(c),w)return function()j.unmount(i)i=nil end end
local ReplicatedStorage = game:GetService("ReplicatedStorage")

local Roact = require(ReplicatedStorage.Packages.Roact)
local GooeyParticles = require(ReplicatedStorage.Packages.GooeyParticles)

local Particles = GooeyParticles.RoactElement

local TestEmitter = Roact.PureComponent:extend("TestEmitter")

function TestEmitter:init()
	self:setState({
		hovered = false
	})
end

function TestEmitter:render()
	return Roact.createElement("TextButton", {
		AnchorPoint = Vector2.new(0.5, 0.5),
		BackgroundColor3 = Color3.new(1, 1, 1),
		Font = Enum.Font.Gotham,
		Position = UDim2.fromScale(0.5, 0.5),
		Size = UDim2.fromOffset(200, 50),
		Text = "Hover over me!",
		TextSize = 20,
		ZIndex = 2,

		[Roact.Event.MouseEnter] = function()
			self:setState({
				hovered = true
			})
		end,
		[Roact.Event.MouseLeave] = function()
			self:setState({
				hovered = false
			})
		end,
	}, {
		UICorner = Roact.createElement("UICorner", {
			CornerRadius = UDim.new(0, 4)
		}),

		Particles = Roact.createElement(Particles, {
			Enabled = self.state.hovered,
			Rotation = NumberRange.new(-360, 360),
			Lifetime = NumberRange.new(0.3, 0.5),
			Rate = 40,
			Image = "rbxassetid://6319951708",
			Size = NumberSequence.new({
				NumberSequenceKeypoint.new(0, 0),
				NumberSequenceKeypoint.new(1, 100)
			}),
			Transparency = NumberSequence.new({
				NumberSequenceKeypoint.new(0, 0),
				NumberSequenceKeypoint.new(1, 1)
			}),
			Color = ColorSequence.new({
				ColorSequenceKeypoint.new(0, Color3.new(1, 1, 1)),
				ColorSequenceKeypoint.new(1, Color3.new(1, 1, 0))
			}),
		})
	})
end

return function(t)
	local handle = Roact.mount(Roact.createElement(TestEmitter), t)
	return function()
		Roact.unmount(handle)
		handle = nil
	end
end
