Advertisement
yasyamaru

Untitled

Apr 21st, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.13 KB | None | 0 0
  1. on load:
  2. send "&a//&7----&b/ &a&l&oAdvanced LaunchPads&b /&7----&a//" to console
  3. send " " to console
  4. send "{@console} &aRunning on version &c{@ver}" to console
  5. send "{@console} &bThank you for downloading/using my skripts :)" to console
  6. send "{@console} &eSkript made by &aAyham Alali &cYT&7:&a@ayham5131" to console
  7. send " " to console
  8. send "&a//&7----&b/ &a&l&oAdvanced LaunchPads&b /&7----&a//" to console
  9. set {_NewVer} to text from "http://pastebin.com/raw/bdn5ncE6"
  10. set {_UpdateInfo} to text from url "http://pastebin.com/raw/dvCG3pTc"
  11. if "{@CheckUpdate}" is "true":
  12. send "{@console} &eChecking for update..." to console
  13. if "{@CheckUpdate}" is "true":
  14. if "%{_NewVer}%" is not "{@ver}":
  15. replace all "[nl]" with new line in {_UpdateInfo}
  16. replace all "[p]" with "{@p}" in {_UpdateInfo}
  17. send "&7()&c---------&7()" to console
  18. send "{@console} &aThere is a new update for &cAdavanced LaunchPads&7, &aYou are using version &c{@ver}&7, &aNew version&7 > &c%{_NewVer}%" to console
  19. send "{@console} &aUpdate info: %colored {_UpdateInfo}%" to console
  20. send "&7()&c---------&7()" to console
  21. else if "%{_NewVer}%" is "{@ver}":
  22. send "{@console}&a is up to date&7, &aNo new updates." to console
  23.  
  24. loop all players:
  25. if loop-player has permission "{@UpdateCheckPerm}":
  26. if "%{_NewVer}%" is not "{@ver}":
  27. replace all "[nl]" with new line in {_UpdateInfo}
  28. replace all "[p]" with "{@p}" in {_UpdateInfo}
  29. send "&7()&c---------&7()" to loop-player
  30. send "{@p} &aThere is a new update for &cAdvanced LaunchPads&7, &aYou are using version &c{@ver}&7, &aNew version&7 > &c%{_NewVer}%" to loop-player
  31. send "{@p} &aUpdate info: &c%colored {_UpdateInfo}%" to loop-player
  32. send "&7()&c---------&7()" to loop-player
  33. else if "%{_NewVer}%" is "{@ver}":
  34. send "{@p}&a is up to date&7, &aNo new updates." to loop-player
  35. wait 1 ticks
  36. send "{@console} &ahas been loaded successfully." to console
  37.  
  38. on unload:
  39. send "{@console} &chas been unloaded successfully." to console
  40.  
  41.  
  42. on join:
  43. if {Launching.%uuid of player%} is not set:
  44. set {Launching.%uuid of player%} to false
  45.  
  46. if {LaunchingVIP.%uuid of player%} is not set:
  47. set {LaunchingVIP.%uuid of player%} to false
  48.  
  49. if {LaunchPad.%uuid of player%} is not set:
  50. set {LaunchPad.%uuid of player%} to false
  51.  
  52. if {countdown.%uuid of player%} is not set:
  53. set {countdown.%uuid of player%} to false
  54.  
  55. if {flightdis.%uuid of player%} is not set:
  56. set {flightdis.%uuid of player%} to false
  57.  
  58. if {flightena.%uuid of player%} is not set:
  59. set {flightena.%uuid of player%} to false
  60.  
  61.  
  62. command /{@CmdName} [<text>] [<text>]:
  63. permission: {@CmdPerm}
  64. permission message: {@NoPerm}
  65. description: {@CmdDesc}
  66. aliases: {@CmdAliases}
  67. executable by: players
  68. trigger:
  69. if arg-1 is "help":
  70. send "&a&l«&2&m---------&a&l LaunchPads &2&m---------&a&l»"
  71. send ""
  72. send "{@p} Help page.."
  73. send "{@p} &a/{@CmdName}&2 <ID> &7- Register a new launchpad (if LaunchPadsRegister is enabled)"
  74. send "{@p} &a/{@CmdName} &2info &7- Show the info of the LP below you"
  75. send "{@p} &a/{@CmdName} &2list &7- Show the Resgistered Launchpads list"
  76. send "{@p} &a/{@CmdName} &2help &7- Show this message"
  77. send "{@p} &a/{@CmdName} &2teleport&7/&2tp &7- Teleport to launchpad using LP-ID"
  78. send ""
  79. send "&a&l«&2&m------------------------------&a&l»"
  80. stop
  81. if arg-1 is "teleport" or "tp":
  82. if arg-2 is set:
  83. if {Loc.%arg-2%} is set:
  84. teleport player to {Loc.%arg-2%}
  85. send "{@p} &aTeleported to Launchpad ID: &c%arg-2%"
  86. stop
  87. else if {Loc.%arg-2%} is not set:
  88. send "{@p} &7There os no Launchpad with ID: &c%arg-2%"
  89. stop
  90. else:
  91. send "{@p} &7Usage: &a/{@CmdName} tp <ID>"
  92. stop
  93. if "{@LaunchPadsRegister}" is "false":
  94. send "{@p} &7LaunchPadsRegister: &c&l{@LaunchPadsRegister}"
  95. stop
  96. else if "{@LaunchPadsRegister}" is "true":
  97. if arg-1 is not set:
  98. send "{@p} &c&oLaunchPad ID is missing."
  99. stop
  100. if arg-1 is "info":
  101. if {launchpadtoggle.%location of block below player%} is true:
  102. send "&7LaunchPad Registered:&a&l %{launchpadtoggle.%location of block below player%}%"
  103. send "&7LaunchPad Info:&a&l %{launchpadinfo.%location of block below player%}%"
  104. stop
  105. else:
  106. send "{@p} &7This is not a luanchpad!"
  107. stop
  108. if arg-1 is "list":
  109. if "{@LaunchPadsRegister}" is "false":
  110. send "{@p} &7LaunchPadsRegister: &c&l{@LaunchPadsRegister}"
  111. stop
  112. else if "{@LaunchPadsRegister}" is "true":
  113. if {launchpads::*} is set:
  114. send "{@p} &7LaunchPads List:%nl%&a %{LaunchPads::*}%"
  115. stop
  116. if {launchpads::*} is not set:
  117. send "{@p} &cThere is no Registered LaunchPads."
  118. stop
  119. if arg-1 is not "info" or "list" or "help" or "teleport" or "tp":
  120. if block below player is {@TopBlock}:
  121. set {_TopB} to block below player
  122. if block below {_TopB} is {@ButtomBlock}:
  123. if {launchpadtoggle.%location of block below player%} is not set:
  124. if {launchpadsid::ids::*} is not set:
  125. set {launchpadtoggle.%location of block below player%} to true
  126. set {launchpadinfo.%location of block below player%} to "&aID: &c%arg-1%&7, &aWorld: &c%world%&7, &aLoc: &c%location of block below player%%nl%"
  127. add {launchpadinfo.%location of block below player%} to {LaunchPads::*}
  128. add arg-1 to {launchpadsid::ids::*}
  129. set {Loc.%arg-1%} to location of player # of Block will tp him inside the block
  130. send "{@p} &aThe LaunchPad below you has been &l&oEnabled."
  131. stop
  132. else:
  133. loop {launchpadsid::ids::*}:
  134. if "%loop-value%" = "%arg-1%":
  135. send "{@p} &c&oID:&b&o %arg-1%&c&o is used&7,&c&o try another one."
  136. #stop
  137. if "%loop-value%" != "%arg-1%":
  138. set {launchpadtoggle.%location of block below player%} to true
  139. set {launchpadinfo.%location of block below player%} to "&aID: &c%arg-1%&7, &aWorld: &c%world%&7, &aLoc: &c%location of block below player%%nl%"
  140. add {launchpadinfo.%location of block below player%} to {LaunchPads::*}
  141. add arg-1 to {launchpadsid::ids::*}
  142. set {Loc.%arg-1%} to location of player # of Block will tp him inside the block
  143. send "{@p} &aThe LaunchPad below you has been &l&oEnabled."
  144. stop loop
  145. if {launchpadtoggle.%location of block below player%} is false:
  146. if {launchpadsid::ids::*} is not set:
  147. set {launchpadtoggle.%location of block below player%} to true
  148. set {launchpadinfo.%location of block below player%} to "&aID: &c%arg-1%&7, &aWorld: &c%world%&7, &aLoc: &c%location of block below player%%nl%"
  149. add {launchpadinfo.%location of block below player%} to {LaunchPads::*}
  150. set {Loc.%arg-1%} to location of block below player
  151. add arg-1 to {launchpadsid::ids::*}
  152. send "{@p} &aThe LaunchPad below you has been &l&oEnabled."
  153. stop
  154. else:
  155. loop {launchpadsid::ids::*}:
  156. if "%loop-value%" = "%arg-1%":
  157. send "{@p} &c&oID:&b&o %arg-1%&c&o is used&7,&c&o try another one."
  158. stop
  159. else if "%loop-value%" != "%arg-1%":
  160. set {launchpadtoggle.%location of block below player%} to true
  161. set {launchpadinfo.%location of block below player%} to "&aID: &c%arg-1%&7, &aWorld: &c%world%&7, &aLoc: &c%location of block below player%%nl%"
  162. add {launchpadinfo.%location of block below player%} to {LaunchPads::*}
  163. set {Loc.%arg-1%} to location of player # of Block will tp him inside the block
  164. add arg-1 to {launchpadsid::ids::*}
  165. send "{@p} &aThe LaunchPad below you has been &l&oEnabled."
  166. stop loop
  167. else if {launchpadtoggle.%location of block below player%} is true:
  168. set {_RemoveLPI.%location of block below player%} to "&aID: &c%arg-1%&7, &aWorld: &c%world%&7, &aLoc: &c%location of block below player%%nl%"
  169. if "%{launchpadinfo.%location of block below player%}%" is "%{_RemoveLPI.%location of block below player%}%":
  170. set {launchpadtoggle.%location of block below player%} to false
  171. remove {launchpadinfo.%location of block below player%} from {LaunchPads::*}
  172. remove arg-1 from {launchpadsid::ids::*}
  173. clear {Loc.%arg-1%}
  174. clear {launchpadinfo.%location of block below player%}
  175. clear {_RemoveLPI.%location of block below player%}
  176. send "{@p} &cThe LaunchPad below you has been &l&odisabled."
  177. stop
  178. else if "%{launchpadinfo.%location of block below player%}%" is not "%{_RemoveLPI.%location of block below player%}%":
  179. send "{@p}&c This LaunchPad is already Registered."
  180. send "{@p}&7 To remove it type &c/{@CmdName} info"
  181. send "{@p}&7 then type &c/{@CmdName} <ID of LaunchPad below you>"
  182. stop
  183. else:
  184. send "{@p} &c&oBlock below you is not the LaunchPad Buttom Block &7( &b&o{@ButtomBlock} &7)"
  185. stop
  186. else:
  187. send "{@p} &c&oBlock below you is not the LaunchPad Top Block &7( &b&o{@TopBlock} &7)"
  188. stop
  189.  
  190. on break:
  191. if event-block is {@TopBlock}:
  192. if {launchpadtoggle.%location of event-block%} is true:
  193. cancel event
  194. send "{@p} &c&oYou have to Unregister this Launchpad first&7,"
  195. send "{@p} &c&odo &b&o/{@CmdName} info&c&o to see the info of this LaunchPad "
  196. send "{@p} &c&odo &b&o/{@CmdName} <ID of LaunchPad below you>&c&o to Remove it"
  197. if event-block is {@ButtomBlock}:
  198. if {launchpadtoggle.%location of block above event-block%} is true:
  199. cancel event
  200. send "{@p} &c&oYou have to Unregister this Launchpad first&7,"
  201. send "{@p} &c&odo &b&o/{@CmdName} info&c&o to see the info of this LaunchPad "
  202. send "{@p} &c&odo &b&o/{@CmdName} <ID of LaunchPad below you>&c&o to Remove it"
  203.  
  204. on explode:
  205. loop exploded blocks:
  206. if loop-block is {@TopBlock}:
  207. if {launchpadtoggle.%location of loop-block%} is true:
  208. cancel event
  209. if loop-block is {@ButtomBlock}:
  210. if {launchpadtoggle.%location of block above loop-block%} is true:
  211. cancel event
  212.  
  213.  
  214. on fly toggle:
  215. if {LaunchingVIP.%uuid of player%} is true:
  216. cancel event
  217. else if {Launching.%uuid of player%} is true:
  218. cancel event
  219.  
  220. on any move:
  221. if player has permission "{@perm}":
  222. if player's world is {@worlds}:
  223. if "{@LaunchPadsRegister}" is "true":
  224. if {launchpadtoggle.%location of block below player%} is true:
  225. if block below player is {@TopBlock}:
  226. set {_Block1} to block below player
  227. if block below {_Block1} is {@ButtomBlock}:
  228. if player has permission "{@permvip}":
  229. if {countdown.%uuid of player%} is false:
  230. if player's flight state is false:
  231. set {flightdis.%uuid of player%} to true
  232. set player's flight state to true
  233. else if player's flight state is true:
  234. set {flightena.%uuid of player%} to true
  235. play raw sound "{@SoundVIP}" at location of player with pitch 10 volume 1
  236. #skellett play "{@SoundVIP}" to player at volume 1 and pitch 10
  237. set {LaunchingVIP.%uuid of player%} to true
  238. push player upwards at speed {@PushUpVIP}
  239. wait 3 ticks
  240. push player forwards at speed {@PushForwardVIP}
  241. set {countdown.%uuid of player%} to true
  242. wait {@Cooldown} seconds
  243. set {countdown.%uuid of player%} to false
  244. else if player doesn't have permission "{@permvip}":
  245. if {countdown.%uuid of player%} is false:
  246. if player's flight state is false:
  247. set {flightdis.%uuid of player%} to true
  248. set player's flight state to true
  249. else if player's flight state is true:
  250. set {flightena.%uuid of player%} to true
  251. play raw sound "{@Sound}" at location of player with pitch 10 volume 1
  252. #skellett play "{@Sound}" to player at volume 1 and pitch 10
  253. set {Launching.%uuid of player%} to true
  254. push player upwards at speed {@PushUp}
  255. wait 3 ticks
  256. push player forwards at speed {@PushForward}
  257. set {countdown.%uuid of player%} to true
  258. wait {@Cooldown} seconds
  259. set {countdown.%uuid of player%} to false
  260. else if "{@LaunchPadsRegister}" is "false":
  261. if block below player is {@TopBlock}:
  262. set {_Block1} to block below player
  263. if block below {_Block1} is {@ButtomBlock}:
  264. if player has permission "{@permvip}":
  265. if {countdown.%uuid of player%} is false:
  266. if player's flight state is false:
  267. set {flightdis.%uuid of player%} to true
  268. set player's flight state to true
  269. else if player's flight state is true:
  270. set {flightena.%uuid of player%} to true
  271. play raw sound "{@SoundVIP}" at location of player with pitch 10 volume 1
  272. #skellett play "{@SoundVIP}" to player at volume 1 and pitch 10
  273. set {LaunchingVIP.%uuid of player%} to true
  274. push player upwards at speed {@PushUpVIP}
  275. wait 3 ticks
  276. push player forwards at speed {@PushForwardVIP}
  277. set {countdown.%uuid of player%} to true
  278. wait {@Cooldown} seconds
  279. set {countdown.%uuid of player%} to false
  280. else if player doesn't have permission "{@permvip}":
  281. if {countdown.%uuid of player%} is false:
  282. if player's flight state is false:
  283. set {flightdis.%uuid of player%} to true
  284. set player's flight state to true
  285. else if player's flight state is true:
  286. set {flightena.%uuid of player%} to true
  287. play raw sound "{@Sound}" at location of player with pitch 10 volume 1
  288. #skellett play "{@Sound}" to player at volume 1 and pitch 10
  289. set {Launching.%uuid of player%} to true
  290. push player upwards at speed {@PushUp}
  291. wait 3 ticks
  292. push player forwards at speed {@PushForward}
  293. set {countdown.%uuid of player%} to true
  294. wait {@Cooldown} seconds
  295. set {countdown.%uuid of player%} to false
  296.  
  297. else:
  298. # Ver 1.3 and 1.4.1
  299. if player doesn't have permission "{@perm}":
  300. if player's world is {@worlds}:
  301. if block below player is {@TopBlock}:
  302. set {_Block1} to block below player
  303. if block below {_Block1} is {@ButtomBlock}:
  304. send "{@NoPermLaunch}"
  305. on any move:
  306. if {LaunchingVIP.%uuid of player%} is true:
  307. show {@ParticleVIPCount1} "{@ParticleVIP1}" Particle at location of player for player offset by 0, 0.2, 0
  308. show {@ParticleVIPCount2} "{@ParticleVIP2}" Particle at location of player for player offset by 0, 0.2, 0
  309.  
  310. else if {Launching.%uuid of player%} is true:
  311. show {@ParticleCount} "{@Particle}" Particle at location of player for player offset by 0, 0.2, 0
  312.  
  313. on any move:
  314. player is on ground:
  315. if {LaunchingVIP.%uuid of player%} is true:
  316. set {LaunchingVIP.%uuid of player%} to false
  317. if {Launching.%uuid of player%} is true:
  318. set {Launching.%uuid of player%} to false
  319. if {damage.%uuid of player%} is true:
  320. wait 2 ticks
  321. set {damage.%uuid of player%} to false
  322. if {flightdis.%uuid of player%} is true:
  323. set player's flight state to false
  324. set {flightdis.%uuid of player%} to false
  325. else if {flightena.%uuid of player%} is true:
  326. set player's flight state to true
  327. set {flightena.%uuid of player%} to false
  328.  
  329. on damage:
  330. damage cause is fall:
  331. if {damage.%uuid of victim%} is true:
  332. cancel event
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement