NAOSAMA

Untitled

Mar 16th, 2019
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.54 KB | None | 0 0
  1. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
  2. # Author: Hubert Theodore #
  3. # In Game Name: GoldySlime #
  4. # Skype: hubertheodore #
  5. # Skript: @AFKHolo # #
  6. # #
  7. # Feature: #
  8. # -Hologram #
  9. # -AFK with Reason #
  10. # -Sounds
  11. # -AFK Timer #
  12. # #
  13. # Plugins Needed: #
  14. # -Holographic Display #
  15. # -SkRayFall #
  16. # #
  17. # No Permission Needed for this command #
  18. # Commands: /afk [<reason>] #
  19. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
  20.  
  21. variables:
  22.  
  23. #Auto timer for people if they are not moving in game (in second-1). Example 1 minutes(60 sec) -> 59
  24. afkmax= 59
  25. afk.%player%= false
  26. options:
  27.  
  28. logo: &7[&9AFK&7]
  29.  
  30. #Change this to change the message when AFK
  31. yafk: &2%player% &ais now AFK
  32.  
  33. #Change this to change the message when AFK
  34. ylafk: &2%loop-player% &ais now AFK
  35.  
  36. #Change this to change the message when finish AFK
  37. nafk: &2%player% &ais no more AFK
  38.  
  39. #Don't change this
  40. alsn: &7[&9 %arg 1% &7]
  41.  
  42. #Change this to change message when you call someone that afk
  43. safk: &4%loop-player% is still AFK, we will try to call with sounds.
  44.  
  45. # DON'T CHANGE ANYTHING BELOW THIS
  46. # AFK Command
  47.  
  48. command /afk [<text>]:
  49.  
  50. usage: /afk [<reason>]
  51. trigger:
  52.  
  53. if {afk.%player%} is true:
  54. set {afk.%player%} to false
  55. broadcast "{@logo} {@nafk}"
  56. delete holo object "%player%.afk"
  57. stop
  58.  
  59. else:
  60. if argument 1 is not set:
  61. set {afk.%player%} to true
  62. broadcast "{@logo} {@yafk}"
  63. create holo object "ItemStack:BARRIER;&f&m--------&4A&cF&4K&f&m--------" with id "%player%.afk" at location 3.5 meters above player
  64. stop
  65.  
  66. else:
  67. set {afk.%player%} to true
  68. broadcast "{@logo} {@yafk} because {@alsn}"
  69. create holo object "ItemStack:BARRIER;&f&m--------&4A&cF&4K&f&m--------;{@alsn}" with id "%player%.afk" at location 3.5 meters above player
  70. stop
  71. on chat:
  72. if {afk.%player%} is true:
  73. set {afk.%player%} to false
  74. broadcast "{@logo} {@nafk}"
  75. delete holo object "%player%.afk"
  76. delete {afpl%player%}
  77.  
  78. on inventory click:
  79. if {afk.%player%} is true:
  80. set {afk.%player%} to false
  81. broadcast "{@logo} {@nafk}"
  82. delete holo object "%player%.afk"
  83. delete {afpl%player%}
  84.  
  85. on join:
  86. if {afk.%player%} is true:
  87. set {afk.%player%} to false
  88. broadcast "{@logo} {@nafk}"
  89. delete holo object "%player%.afk"
  90. delete {afpl%player%}
  91.  
  92. on quit:
  93. if {afk.%player%} is true:
  94. set {afk.%player%} to false
  95. broadcast "{@logo} {@nafk}"
  96. delete holo object "%player%.afk"
  97. delete {afpl%player%}
  98.  
  99. on place:
  100. if {afk.%player%} is true:
  101. set {afk.%player%} to false
  102. broadcast "{@logo} {@nafk}"
  103. delete holo object "%player%.afk"
  104. delete {afpl%player%}
  105.  
  106. on death:
  107. if {afk.%player%} is true:
  108. set {afk.%player%} to false
  109. broadcast "{@logo} {@nafk}"
  110. delete holo object "%player%.afk"
  111. delete {afpl%player%}
  112.  
  113. on command:
  114. if {afk.%player%} is true:
  115. set {afk.%player%} to false
  116. broadcast "{@logo} {@nafk}"
  117. delete holo object "%player%.afk"
  118. delete {afpl%player%}
  119.  
  120. on any move:
  121. if {afk.%player%} is true:
  122. loop all blocks in radius 2 around player:
  123. loop-block is water or piston or sticky_piston:
  124. stop
  125. loop all players in radius 2 around player:
  126. loop-player is not "%player%":
  127. stop
  128. loop all animals in radius 2 around player:
  129. loop-animal is set:
  130. stop
  131. set {afk.%player%} to false
  132. broadcast "{@logo} {@nafk}"
  133. delete holo object "%player%.afk"
  134. delete {afpl%player%}
  135.  
  136. on tool change:
  137. if {afk.%player%} is true:
  138. set {afk.%player%} to false
  139. broadcast "{@logo} {@nafk}"
  140. delete holo object "%player%.afk"
  141. delete {afpl%player%}
  142.  
  143. on teleport:
  144. if {afk.%player%} is true:
  145. set {afk.%player%} to false
  146. broadcast "{@logo} {@nafk}"
  147. delete holo object "%player%.afk"
  148. delete {afpl%player%}
  149.  
  150. on inventory open:
  151. if {afk.%player%} is true:
  152. set {afk.%player%} to false
  153. broadcast "{@logo} {@nafk}"
  154. delete holo object "%player%.afk"
  155. delete {afpl%player%}
  156.  
  157. on join:
  158. if {afk.%player%} is true:
  159. set {afk.%player%} to false
  160. broadcast "{@logo} {@nafk}"
  161. delete holo object "%player%.afk"
  162. delete {afpl%player%}
  163.  
  164. on death of player:
  165. if {afk.%victim%} is true:
  166. set {afk.%victim%} to false
  167. broadcast "{@logo} {@nafk}"
  168. delete holo object "%victim%.afk"
  169. delete {afpl%victim%}
  170.  
  171. on respawn:
  172. if {afk.%player%} is true:
  173. set {afk.%player%} to false
  174. broadcast "{@logo} {@nafk}"
  175. delete holo object "%player%.afk"
  176. delete {afpl%player%}
  177.  
  178. on chat:
  179. loop all players:
  180. if message contains "%loop-player%":
  181. if {afk.%loop-player%} is true:
  182. send "{@logo} {@safk}"
  183. #Sound is not working in 1.12.1
  184. play raw sound "note.bassattack" at loop-player with pitch 0 volume 1
  185. wait 1 seconds
  186. play raw sound "note.harp" at loop-player with pitch 0 volume 1
  187.  
  188.  
  189. every 1 seconds:
  190. loop all players:
  191. add 1 to {afpl%loop-player%}
  192. wait 1 tick
  193. if {afpl%loop-player%} is more than {afkmax}:
  194. if {afk.%loop-player%} is true:
  195. stop
  196. else:
  197. set {afk.%loop-player%} to true
  198. broadcast "{@logo} {@ylafk}"
  199. create holo object "ItemStack:BARRIER;&f&m--------&4A&cF&4K&f&m--------" with id "%loop-player%.afk" at location 3.5 meters above loop-player
  200. stop
Add Comment
Please, Sign In to add comment