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={Rotation=NumberRange.new(-360,360),Lifetime=1,Image="\114\098\120\097\115\115\101\116\105\100\058\047\047\050\052\049\054\050\057\048\053\051",Speed=30,Size=NumberSequence.new({NumberSequenceKeypoint.new(0,100);NumberSequenceKeypoint.new(1,0)}),Transparency=NumberSequence.new({NumberSequenceKeypoint.new(0,0),NumberSequenceKeypoint.new(1,1)})}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="\067\108\105\099\107 \109\101\033",TextSize=20;ZIndex=2;[j.Event.MouseButton1Click]=function(w)i.Emit(w,UDim2.fromScale(.5,.5),b,20)end},{UICorner=j.createElement("\085\073\067\111\114\110\101\114",{CornerRadius=UDim.new(0,4)})})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 PARTICLE_PROPS = {
	Rotation = NumberRange.new(-360, 360),
	Lifetime = 1,
	Image = "rbxassetid://241629053",
	Speed = 30,
	Size = NumberSequence.new({
		NumberSequenceKeypoint.new(0, 100),
		NumberSequenceKeypoint.new(1, 0)
	}),
	Transparency = NumberSequence.new({
		NumberSequenceKeypoint.new(0, 0),
		NumberSequenceKeypoint.new(1, 1)
	}),
}

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 = "Click me!",
		TextSize = 20,
		ZIndex = 2,

		[Roact.Event.MouseButton1Click] = function(rbx)
			GooeyParticles.Emit(rbx, UDim2.fromScale(0.5, 0.5), PARTICLE_PROPS, 20)
		end
	}, {
		UICorner = Roact.createElement("UICorner", {
			CornerRadius = UDim.new(0, 4)
		}),
	})
end

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

