function main(self)
	local claw = GetClaw()

	if self.State == 0 then
		self.Flags.AlwaysActive, self.DrawFlags.NoDraw = true, true
		-- No ammo at the start:
		PlayerData().PistolAmmo, PlayerData().MagicAmmo, PlayerData().TNTAmmo = 0, 0, 0
		-- Destroy normal checkpoints:
		GetObject(94):Destroy()
		GetObject(104):Destroy()
		GetObject(2512):Destroy()
		GetObject(2513):Destroy()
		GetObject(2674):Destroy()
		GetObject(898):Destroy()
		GetObject(914):Destroy()
		GetObject(925):Destroy()
		GetObject(2072):Destroy()
		GetObject(3528):Destroy()
		GetObject(2333):Destroy()
		GetObject(3699):Destroy()
		GetObject(3263):Destroy()
		-- Change extra lives to big health potions:
		GetObject(373).Powerup = DropItem.Potion3
		GetObject(663).Powerup = DropItem.Potion3
		GetObject(2778).Powerup = DropItem.Potion3
		local extraLife = GetObject(4815)
		CreateObject{
			X = extraLife.X,
			Y = extraLife.Y,
			Z = 4000,
			Logic = "HealthPowerup",
			Image = "GAME_HEALTH_POTION3"
		}
		extraLife:Destroy()
		local extraLife2 = GetObject(648)
		CreateObject{
			X = extraLife2.X,
			Y = extraLife2.Y,
			Z = 4000,
			Logic = "HealthPowerup",
			Image = "GAME_HEALTH_POTION3"
		}
		extraLife2:Destroy()
		local extraLife3 = GetObject(5341)
		CreateObject{
			X = extraLife3.X,
			Y = extraLife3.Y,
			Z = 4000,
			Logic = "HealthPowerup",
			Image = "GAME_HEALTH_POTION3"
		}
		extraLife3:Destroy()

		RemoveSound"GAME_EXTRALIFE"

		-- Block Amulet of Nine Lives in single-player:
		if GetGameType() == GameType.SinglePlayer then
			local detector = GetObject(3206)
			table.insert(detector.ListOfAlreadyChosen, 1)
			self.State = 1
		else -- multi-player:
			-- Destroy death curses:
			GetObject(1969):Destroy()
			GetObject(2323):Destroy()
			self.State = 2
		end
	end

	-- One life mode for single-player (Hellzone style) with anti-cheat:
	if self.State == 1 then
		if CheatsUsed() then
            TextOut("Anti-cheat system for the Hardcore mode")
			self.State = 3
		end
		if Attempt() > 0 then
			self.State = 3
		end
        if PlayerData().Lives > 1 then
			PlayerData().Lives = 1
		end
		if claw.Health <= 0 then
			mdl_exe.Cheats[0] = 0 -- force mpkfa off
			PlayerData().Lives = 0
		end
	end

	-- One life mode for multi-player (Hellzone style):
	if self.State == 2 and Attempt() > 0 then
		self.State = 3
	end

	-- Eternal prison (anti-cheat):
	if self.State == 3 then
		if claw.State ~= ClawStates.DeathFall and claw.State ~= ClawStates.Death then
			if (claw.X < 5150 or claw.X > 6050 or claw.Y < 1100 or claw.Y > 1900) then
				SetRespawnPoint(5620, 1500)
				claw.X = 5620
				claw.Y = 1500
			end
		else
			mdl_exe.Cheats[0] = 0 -- force mpkfa off
			PlayerData().Lives = 0
		end
	end
end
