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) 

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

As I said before, where is ply defined? Chances are, if you just posted this at the bottom of your file, it isn’t. You need to put the check in your PROPSPEC.Recharge function at the bottom.

Which he did, jussayin (line 147 is the last line of the default code)