1. --[[
  2. Made by Riley#0808
  3. delta hitmarkers.lua
  4. ]]
  5. local notifications = {}
  6. local center = (workspace.CurrentCamera.ViewportSize / 2)
  7. function hitmarker_update()
  8. for i = 1, #notifications do
  9. notifications[i].Position = Vector2.new(center.X,(center.Y + 150) + (i * 18))
  10. end
  11. end
  12. function hitmarker(hitpart, username, duration)
  13. task.spawn(function()
  14. local hitlog = Drawing.new('Text')
  15. hitlog.Size = 13
  16. hitlog.Font = 2
  17. hitlog.Text = '[femboy.rip] damage inflicted to '..username..' on '..hitpart
  18. hitlog.Visible = true
  19. hitlog.ZIndex = 3
  20. hitlog.Center = true
  21. hitlog.Color = Color3.fromRGB(138,43,226)
  22. hitlog.Outline = true
  23. table.insert(notifications, hitlog)
  24. hitmarker_update()
  25. wait(duration)
  26. table.remove(notifications, table.find(notifications, hitlog))
  27. hitmarker_update()
  28. hitlog:Remove()
  29. end)
  30. end
  31. local namecall ; namecall = hookmetamethod(game, '__namecall', function(obj, ...)
  32. local args = {...}
  33. if getnamecallmethod() == 'FireServer' and obj.Name == 'ProjectileInflict' then
  34. hitmarker(tostring(args[2]), tostring(args[1]), 3)
  35. end
  36. return namecall(obj, unpack(args))
  37. end)