Xfer1111

Zombie Strike Always HeadShot

Oct 18th, 2020
880
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- Script not owned by me, credits to the original Owner.
  2. -- Xfer was here (T.V.K)
  3. -- Working as of 5/2/2020
  4.  
  5. --ProtoSmasher Compatible
  6. if PROTOSMASHER_LOADED then
  7.     getgenv().getnamecallmethod = get_namecall_method
  8.     getgenv().newcclosure = protect_function
  9. end
  10.  
  11. --Always Headshot
  12. local mt = getrawmetatable(game)
  13. make_writeable(mt)
  14. local old = mt.__namecall
  15. mt.__namecall = newcclosure(loadstring([[
  16.     local old = ...
  17.     return function(self, ...)
  18.         local len = select("#", ...)
  19.         local pack = {...}
  20.         local args = {}
  21.         for i=1,len do
  22.             args[i] = pack[i]
  23.         end
  24.         local method = getnamecallmethod()
  25.         if method == "FireServer" and tostring(self) == "Shoot" and typeof(args[3]) == "table" then
  26.             for i,v in pairs(args[3]) do
  27.                 if typeof(v) == "table" then
  28.                     args[3][i][1] = args[3][i][1].Parent.Head
  29.                     print(args[3][i][1])
  30.                 end
  31.             end
  32.             return old(self, unpack(args))
  33.         end
  34.         return old(self, ...)
  35.     end
  36. ]])(old))
RAW Paste Data