function module.SetupItem(M,L,m,i)if i then wait(.1)end local N=main.pd[L]local T=N.Items[m]local x=(main:GetModule("\099\102")):GetHead(L)if x and N then if m=="\070\114\101\101\122\101\066\108\111\099\107"then(main:GetModule("\099\102")):Movement(false,L);(main:GetModule("\099\102")):SetTransparency(L.Character,1)if T:FindFirstChild("\070\114\101\101\122\101\067\108\111\110\101")then main.signals.SetCameraSubject:FireClient(L,T.FreezeClone.Humanoid)end elseif m=="\074\097\105\108\067\101\108\108"then x.CFrame=T.Union.CFrame elseif m=="\067\111\110\116\114\111\108\080\108\114"then local m=T.Value local i=(main:GetModule("\099\102")):GetHumanoid(L)if m and i then(main:GetModule("\077\111\114\112\104\072\097\110\100\108\101\114")):BecomeTargetPlayer(L,m.UserId)main.signals.SetCameraSubject:FireClient(L,i);(main:GetModule("\099\102")):CreateFakeName(L,m.Name)else(main:GetModule("\099\102")):RemoveControlPlr(L)end elseif m=="\085\110\100\101\114\067\111\110\116\114\111\108"then local m=T.Value local i=(main:GetModule("\099\102")):GetHumanoid(m)if m and i then main.signals.SetCameraSubject:FireClient(L,i)L.Character.Parent=nil else(main:GetModule("\099\102")):RemoveUnderControl(L)end end end end return module

function module:SetupItem(player, itemName, playerRespawned)
	if playerRespawned then
		wait(0.1)
	end
	local pdata = main.pd[player]
	local item = pdata.Items[itemName]
	local head = main:GetModule("cf"):GetHead(player)
	if head and pdata then
		
		if itemName == "FreezeBlock" then
			main:GetModule("cf"):Movement(false, player)
			main:GetModule("cf"):SetTransparency(player.Character, 1)
			if item:FindFirstChild("FreezeClone") then
				main.signals.SetCameraSubject:FireClient(player, (item.FreezeClone.Humanoid))
			end
			
		elseif itemName == "JailCell" then
			head.CFrame = item.Union.CFrame
		
		elseif itemName == "ControlPlr" then
			local plr = item.Value
			local controllerHumanoid = main:GetModule("cf"):GetHumanoid(player)
			if plr and controllerHumanoid then
				main:GetModule("MorphHandler"):BecomeTargetPlayer(player, plr.UserId)
				main.signals.SetCameraSubject:FireClient(player, (controllerHumanoid))
				main:GetModule("cf"):CreateFakeName(player, plr.Name)
			else
				main:GetModule("cf"):RemoveControlPlr(player)
			end
			
		elseif itemName == "UnderControl" then
			local controller = item.Value
			local controllerHumanoid = main:GetModule("cf"):GetHumanoid(controller)
			if controller and controllerHumanoid then
				main.signals.SetCameraSubject:FireClient(player, (controllerHumanoid))
				--main:GetModule("cf"):SetTransparency(player.Character, 1, true)
				--main:GetModule("cf"):Movement(false, player)
				player.Character.Parent = nil
			else
				main:GetModule("cf"):RemoveUnderControl(player)
			end
			
			-- Controler
			-- Plr
			
		end
	end
end



return module
