Advertisement
Guest User

Untitled

a guest
Oct 22nd, 2017
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.97 KB | None | 0 0
  1. addEventHandler("onClientPlayerDamage", root, function(attacker, weapon, bodypart, loss)
  2. cancelEvent()
  3. HalloweenMonsterName = getPlayerName(source)
  4.  
  5. if HalloweenMonsterName == "Jason" or HalloweenMonsterName == "Chucky" or HalloweenMonsterName == "Freddy" then
  6. HalloweenMonsterLife = getElementHealth(source)
  7. if attacker then
  8. if HalloweenMonsterEventModeOn == true then
  9. HalloweenLoss = loss/1000
  10. if weapon ~= 19 or weapon ~= 51 or weapon ~= 38 then
  11. if HalloweenMonsterDamage == true then
  12. setElementHealth(source, getElementHealth(source)-HalloweenLoss)
  13. setElementHealth(attacker, getElementHealth(attacker)-loss)
  14. if getElementHealth(source)-HalloweenLoss < 100 and getElementHealth(source)-HalloweenLoss >= 80 then
  15. setElementHealth(source, 100)
  16. elseif getElementHealth(source)-HalloweenLoss < 80 and getElementHealth(source)-HalloweenLoss >= 60 then
  17. setElementHealth(source, 80)
  18. elseif getElementHealth(source)-HalloweenLoss < 60 and getElementHealth(source)-HalloweenLoss >= 40 then
  19. setElementHealth(source, 60)
  20. elseif getElementHealth(source)-HalloweenLoss < 40 and getElementHealth(source)-HalloweenLoss >= 20 then
  21. setElementHealth(source, 40)
  22. elseif getElementHealth(source)-HalloweenLoss < 20 and getElementHealth(source)-HalloweenLoss > 0 then
  23. setElementHealth(source, 20)
  24. elseif getElementHealth(source) <= 0 then
  25. triggerServerEvent("OnHalloweenMonsterWasted", root, source)
  26. end
  27. else
  28. setElementHealth(source, getElementHealth(source)-HalloweenLoss)
  29. if getElementHealth(source) <= 0 then
  30. triggerServerEvent("OnHalloweenMonsterWasted", root, source)
  31. end
  32. end
  33. end
  34. else
  35. setElementHealth(source, getElementHealth(source)-loss)
  36. end
  37. end
  38. else
  39. setElementHealth(source, getElementHealth(source)-loss)
  40. end
  41.  
  42. if weapon == 54 then
  43. setElementHealth(source, getElementHealth(source)-loss)
  44. end
  45.  
  46.  
  47. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement