SHARE
TWEET

Not Tested

soulshaker Sep 16th, 2015 (edited) 110 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function onScriptLoad()
  2. {
  3. a <- CreateSprite("100%.png", 900, 160, 0, 0, 0, 255);
  4. b <- CreateSprite("90%.png", 900, 160, 0, 0, 0, 255);
  5. c <- CreateSprite("80%.png", 900, 160, 0, 0, 0, 255);
  6. d <- CreateSprite("70%.png", 900, 160, 0, 0, 0, 255);
  7. e <- CreateSprite("60%.png", 900, 160, 0, 0, 0, 255);
  8. f <- CreateSprite("50%.png", 900, 160, 0, 0, 0, 255);
  9. g <- CreateSprite("40%.png", 900, 160, 0, 0, 0, 255);
  10. h <- CreateSprite("30%.png", 900, 160, 0, 0, 0, 255);
  11. i <- CreateSprite("20%.png", 900, 160, 0, 0, 0, 255);
  12. j <- CreateSprite("10%.png", 900, 160, 0, 0, 0, 255);
  13. k <- CreateSprite("0%.png", 900, 160, 0, 0, 0, 255);
  14. }
  15.  
  16. function onPlayerHealthChange( player, lastHP, newHP )
  17. {
  18. if ( ( player.Health < 100 ) || ( player.Health == 100 ) )
  19. {
  20. k.HideFromPlayer( player );
  21. a.ShowForPlayer(player);
  22. }
  23. if ( player.Health < 90 )
  24. {
  25. a.HideFromPlayer( player );
  26. b.ShowForPlayer(player);
  27. }
  28. if ( player.Health < 80 )
  29. {
  30. b.HideFromPlayer( player );
  31. c.ShowForPlayer(player);
  32. }
  33. if ( player.Health < 70 )
  34. {
  35. c.HideFromPlayer( player );
  36. d.ShowForPlayer(player);
  37. }
  38. if ( player.Health < 60 )
  39. {
  40. d.HideFromPlayer( player );
  41. e.ShowForPlayer(player);
  42. }
  43. if ( player.Health < 50 )
  44. {
  45. e.HideFromPlayer( player );
  46. f.ShowForPlayer(player);
  47. }
  48. if ( player.Health < 40 )
  49. {
  50. f.HideFromPlayer( player );
  51. g.ShowForPlayer(player);
  52. }
  53. if ( player.Health < 30 )
  54. {
  55. g.HideFromPlayer( player );
  56. h.ShowForPlayer(player);
  57. }
  58. if ( player.Health < 20 )
  59. {
  60. h.HideFromPlayer( player );
  61. i.ShowForPlayer(player);
  62. }
  63. if ( player.Health < 10 )
  64. {
  65. i.HideFromPlayer( player );
  66. j.ShowForPlayer(player);
  67. }
  68. if ( player.Health == 0 )
  69. {
  70. j.HideFromPlayer( player );
  71. k.ShowForPlayer( player );
  72. }
  73. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top