BuyCasesEvents.Case0.OnServerEvent:Connect(function(U,J,t,h)if h==true then if U.DataFolder.Points.Value>=J then U.DataFolder.Points.Value-=J print(J)U.Inventory.AdminCase.Value+=1 else MessagesEvents.NotEnoughPoints:FireClient(U)end elseif h==false then if U.DataFolder.Gems.Value>=t then U.DataFolder.Gems.Value-=t print(t)U.Inventory.AdminCase.Value+=1 else MessagesEvents.NotEnoughPoints:FireClient(U)end end end)
----- SCRIPT: -----

BuyCasesEvents.Case0.OnServerEvent:Connect(function(player, PricePoints, PriceGems, PointsBuy)
	if PointsBuy == true then
		if player.DataFolder.Points.Value >= PricePoints then
			player.DataFolder.Points.Value -= PricePoints
			print(PricePoints)
			--Transaction Completed
			player.Inventory.AdminCase.Value += 1 --Choose the case
		else
			MessagesEvents.NotEnoughPoints:FireClient(player)
		end
	elseif PointsBuy == false then
		if player.DataFolder.Gems.Value >= PriceGems then
			player.DataFolder.Gems.Value -= PriceGems
			print(PriceGems)
			--Transaction Completed
			player.Inventory.AdminCase.Value += 1 --Case
		else
			MessagesEvents.NotEnoughPoints:FireClient(player)
		end
	end
end)
