TTT Increased Punch-o-Meter Power for Certain Ulx Groups

I have added some code to the end of my propspec.lua file so that certain groups receive twice the punches and power when possesing props but it is shooting out errors in console when the server runs.

Heres is my code which is pasted at the bottom of propspec.lua in the terror town gamemode folder:

if ply:IsUserGroup("vip") or ply:IsUserGroup("mod") or ply:IsUserGroup("admin") or ply:IsUserGroup("superadmin") then 
     pr.punches = math.min(pr.punches + 2, pr.max) 
    pr.punches = math.min(pr.punches + 2, pr.max) 

Some errors would be nice.

Ah yes, that slipped my mind

Errors are

[ERROR] gamemodes/terrortown/gamemode/propspec.lua:147: attempt to index global 'ply' (a nil value)
  1. unknown - gamemodes/terrortown/gamemode/propspec.lua:147
   2. include - [C]:-1
    3. unknown - gamemodes/terrortown/gamemode/init.lua:50

Where was ply defined?

Edit: Didn’t realize what section this is in. It should probably go in developer discussion.