Actor PicoPencil : Weapon
{
	+INVENTORY.UNDROPPABLE
	+INVENTORY.UNTOSSABLE
	Weapon.SlotNumber 1
	Inventory.RestrictedTo "Pico"
	Inventory.Pickupmessage "You can't go to school without a pencil you silly!"
	Inventory.PickupSound "Pico/equip"
	Tag "Pencil"
	+Weapon.NOALERT
	+WEAPON.MELEEWEAPON
	States
	{
	Ready:
		TNT1 A 1 A_weaponready 
		Loop
	Deselect:
		TNT1 A 1 A_Lower
		TNT1 A 0 A_Lower
		TNT1 A 0 A_Lower
		TNT1 A 0 A_Lower
		TNT1 A 0 A_Lower
		TNT1 A 0 A_Lower
		TNT1 A 0 A_Lower
		Loop
	Select:
		TNT1 A 1 A_Raise 
		TNT1 A 0 A_Raise
		TNT1 A 0 A_Raise
		TNT1 A 0 A_Raise
		TNT1 A 0 A_Raise
		TNT1 A 0 A_Raise
		TNT1 A 0 A_Raise
		Loop
	Fire:
		PIPE C 2 A_FireCustomMissile("PPencilMelee")
		PIPE E 2 
		PIPE BDA 2
		Goto Ready
	Altfire:
		"####" "#" 0 A_jumpifInventory("PicoMeterCountdown",0,1)
		Goto Click
	Weed:
		TNT1 A 0 Offset(-1,32)
		TNT1 A 0 A_takeinventory("PicoAnxyStack",100)
		TNT1 A 0 A_takeinventory("PowerSlowdown",1)
		TNT1 A 0 A_takeinventory("PowerSlowerdown",1)
		TNT1 A 0 A_takeinventory("PowerSlowestdown",1)
		TNT1 A 0 A_takeinventory("PowerPicoDamage",1)
		TNT1 A 0 A_takeinventory("PowerPicoDamage1",1)
		TNT1 A 0 A_takeinventory("PowerPicoDamage2",1)
		TNT1 A 0 A_takeinventory("PowerPicoVulnerability",1)
		TNT1 A 0 A_takeinventory("PowerPicoVulnerability1",1)
		TNT1 A 0 A_takeinventory("PowerPicoVulnerability2",1)
		TNT1 A 0 A_Giveinventory("PicoWeedCoolDown",1)
		P2WD A 1 OFFSET(0,36) A_takeinventory("PicoMeterCountdown",256)
		P2WD A 1 OFFSET(0,33) Healthing(15,100)
		P2WD A 2 OFFSET(0,32)
		P2WD BCD 4
		P2WD E 2
		P2WD E 1 Offset(0,34)
		P2WD E 1 Offset(0,38)
		Goto Select
	Click:
		TNT1 A 2 A_playsound("Pico/WeaponClick",CHAN_AUTO)
		TNT1 A 0 
		GOTO READY
	Spawn:
		TNT1 A -1
		STOP
	}
}
ACTOR PPencilMelee : fastprojectile 
{  
   PROJECTILE
   RENDERSTYLE Translucent
   Species "Player"
   speed 30 //this what sets the distance between the fists apparantly
   damage (15) //formely 30, then i made it so you can punch contineously so i had to nerf it
   ALPHA 0.90
   +Bright
   +DONTBLAST
   +HITTARGET 
   +LOOKALLAROUND
   +BLOODSPLATTER
   +NOTIMEFREEZE
   +FORCEXYBILLBOARD
   damagetype "PPencil"
   scale 0.75
   States
    {
   Spawn:
		TNT1 A 1
		Stop
	Death:
        TNT1 A 0
		TNT1 A 1
		TNT1 A 0 A_PlaySound("PicoPencil/Bonk",0) 
		Stop	  
   XDeath: //If it hits an actor that bleeds
        TNT1 A 0 
		TNT1 A 1 A_PlaySound("PicoPencil/Stab",0) 
		stop
   Crash: //If it hits an actor that doesn't bleed
        TNT1 A 0
        TNT1 A 1
		TNT1 A 0
		TNT1 A 2 A_PlaySound("PicoPencil/Bonk",0)
		Stop
	}
}