· 6 years ago · Dec 19, 2019, 01:44 PM
1options:
2 pre: &c[Tuber]
3 maxName: 20
4
5# VARIABLES
6# {tuber::set::%player%} - Storing the name of the channel + For Checking if the player has a channel
7# {tuber::creation::%player%} - Date and Time when the player created the channel
8# {tuber::desc::%player%} - Description of the channel set by player.
9# {tuber::subs::%player%} - Subscriber Count of player
10# {tuber::views::%player%} - Total View count of player
11# {balance::%player%} - Balance of player
12# {tuber::videos::%player%::*} - The videos of all players
13# {tubers::*} - List of all the channels created
14# {tuber::cooldown::%player%} - cooldown for the video making
15# {tuber::vidViews::{title}} - Views for every video
16# {tuber::recording::%player%} - Time it takes to record
17# {tuber::editing::%player%} - Time it takes to edit
18# {tuber::wifi::%player%} - Time it takes to upload the video
19# {tuber::income::%player%} - Money recieved per video
20# {tuber::alert::%player%} - Toggle alert for subscribers and views
21# {tuber::vSubs::%player%} - Subscribers recieved after making a video
22# {tuber::Owner::%player%} - Shows the owner of the channel
23# {tuber::manager::%player%} - Shows the manager
24# {tuber::ManagerIncome::%player%} - Income of manager
25# {games::%{_U}%::*} - Game List of a player
26# {tuber::type::%{_u}%::%{_t}%} - Type of a video
27
28# Tuber Control Panel
29
30command /t [<text>] [<text>]:
31 aliases:channel, controlpannel, cp, tuber, c
32 trigger:
33 set {_u} to uuid of player
34 if arg-1 is not set:
35 open virtual chest inventory with size 3 named "&c<UBER CONTROL PANEL" to player
36 if {tuber::set::%uuid of player%} is set:
37 set {_channel} to {tuber::set::%uuid of player%}
38 loop all integers from 0 to 3:
39 format gui slot loop-value of player with gray glass pane named "&7" to do nothing
40 loop all integers from 5 to 9:
41 format gui slot loop-value of player with gray glass pane named "&7" to do nothing
42 loop all integers from 17 to 35:
43 format gui slot loop-value of player with gray glass pane named "&7" to do nothing
44 format gui slot 4 of player with skull of ("MHF_Youtube" parsed as offline player) with no nbt named "&c&LCHANNEL &7Control Panel" to do nothing
45 format gui slot 10 of player with skull of ("Evtema3" parsed as offline player) with no nbt named "&c%{_channel}%&7's stats" with lore "&7Channel Creation &8- &c%{tuber::creation::%uuid of player%}%", "&7Description &8- &c%{tuber::desc::%uuid of player%}%", "&7Subscribers &8- &c%{tuber::subs::%uuid of player%}%", "&7Total Views &8- &c%{tuber::views::%uuid of player%}%" and "&7Balance &8- &c%{balance::%uuid of player%}%" to do nothing
46 format gui slot 11 of player with skull of ("quackerz" parsed as offline player) with no nbt named "&e&lVIEW &7all your videos" with lore "&7View all the videos you have made!" to run function page(player, 0)
47 format gui slot 12 of player with skull of ("MHF_Cam" parsed as offline player) with no nbt named "&a&lMAKE &7a Video" with lore "&7Record a video to earn money!" to close then run function chooseGame(player)
48 format gui slot 13 of player with skull of ("MHF_ArrowUp" parsed as offline player) with no nbt named "&3&lSHOP &7&O(Right-Click)" with lore "", "&7Want to Upgrade your setup?", "&7Want to make your recording,", "&7Editing and Publishing faster?", "&7This is the right place for you!" and "" to run function tShop(player)
49 format gui slot 14 of player with skull of ("beaconbitch" parsed as offline player) with no nbt named "&6&lLEADERBOARDS &7&o(Right-Click)" with lore "&7View the leaderboards!" to run function top(player)
50 format gui slot 15 of player with skull of ("snal3s" parsed as offline player) with no nbt named "&c&LMANAGERS &7Area" with lore "&7Hire Managers to earn more money y 8y video!" to run function managers(player)
51 format gui slot 16 of player with skull of ("bedrock" parsed as offline player) with no nbt named "&8&lBLACK &7Market" with lore "&7Psht... Buy subbots here..." to run function bM(player)
52 format gui slot 22 of player with skull of ("Dipicrylamine" parsed as offline player) with no nbt named "&d&lVISIT &7Others" with lore "&7Visit other channels!" to run function vChat(player)
53 format gui slot 21 of player with skull of ("Metroidling" parsed as offline player) with no nbt named "&b&lLIVE STREAM" with lore "&7Live stream for 120 seconds!" to run function chooseGameL(player)
54 else:
55 format gui slot 13 of player with chest named "&c&LCREATE &7a channel" with lore "&7Click this item or execute /tuber create <name>" to close then run function cgCreate(player)
56 else:
57 if arg-1 is "visit":
58 if arg-2 is set:
59 set {_p} to player
60 set {_p2} to arg-2 parsed as offline player
61 set {_u} to uuid of {_p}
62 set {_u2} to uuid of {_p2}
63 set {_channel} to {tuber::set::%{_u2}%}
64 if {tubers::*} contains {tuber::set::%{_u2}%}:
65 open virtual chest inventory with size 3 named "&d&lVISIT &7Panel" to {_p}
66 format gui slot 12 of {_p} with {_p2}'s skull named "&c%{_channel}%&7's stats" with lore "&7Channel Creation &8- &c%{tuber::creation::%{_u2}%}%", "&7Description &8- &c%{tuber::desc::%{_u2}%}%", "&7Subscribers &8- &c%{tuber::subs::%{_u2}%}%", "&7Total Views &8- &c%{tuber::views::%{_u2}%}%", "&7Balance &8- &c%{balance::%{_u2}%}%" and "&7Owner &8- &c%{_p2}%" to do nothing
67 format gui slot 13 of {_p} with ("GoldBlock" parsed as offline player)'s skull named "&7%{_p2}%'s &6&lACHIEVEMENTS" to run function achievements({_p}, {_p2})
68 format gui slot 14 of {_p} with ("quackerz" parsed as offline player)'s skull named "&a&lVIDEO&7 List" with lore "&7View &c%{_p2}%&7's videos." to run function visitPage({_p}, {_p2}, 0)
69 else:
70 if {tubers::*} contains arg-2:
71 set {_owner} to {tuber::owner::%arg-2%} parsed as offline player
72 execute player command "/t visit %{_owner}%"
73 else:
74 send "{@pre} &7This tuber does not exist."
75 if arg-1 is "record":
76 if {tuber::set::%{_u}%} is set:
77 if arg-2 is set:
78 if {tuber::videos::%{_u}%::*} does not contain argument 2:
79 chooseGame(player)
80 add "Wackman" to {games::%uuid of player%::*} if {games::%uuid of player%::*}
81 else:
82 send "{@pre} &7Theres already a video in your video list with that same name."
83 else:
84 send "{@pre} &7/tuber record <title>"
85 else:
86 send "{@pre} &7You don't have a channel."
87 else if arg-1 is "create":
88 if arg-2 is set:
89 if {tuber::set::%{_u}%} is not set:
90 if {tubers::*} does not contain argument-2:
91 cCreate(player, arg-2)
92 else:
93 send "{@pre} &7Someone already has that name, sadly."
94 else:
95 send "{@pre} &7You already have a channel."
96 else if arg-1 is "delete":
97 if {tuber::set::%{_u}%} is set:
98 if {tuber::confirm::%{_u}%} is set:
99 set {_player} to player ? (arg-2 parsed as offline player)
100 cDelete({_player})
101 else:
102 send "{@pre} &7Are you sure you want to delete this channel? If so, please execute the command /t delete again."
103 set {tuber::confirm::%{_u}%} to true
104 else:
105 send "{@pre} &7You don't have a channel."
106 else if arg-1 is "description" or "desc":
107 if {tuber::set::%{_u}%} is set:
108 if arg-2 is set:
109 if length of arg-2 < 25:
110 arg-2 does not contain "nigger" or "fuck" or "n1gger" or "nigg3r" or "hitler" or "slut" or "bitch" or "cunt"
111 set {tuber::desc::%{_u}%} to arg-2
112 send "{@pre} &7Successfully set your channel description to &c%arg-2%&7."
113 else:
114 send "{@pre} &7The maximum length for the channel description is &c25 characters&7."
115 else:
116 send "{@pre} &7Please provide a text."
117 else:
118 send "{@pre} &7You don't have a channel."
119 else if arg-1 is "rename":
120 if arg-2 is set:
121 if {tuber::set::%{_u}%} is set:
122 if length of arg-2 > 2:
123 if length of arg-2 < 20:
124 if {tubers::*} does not contain arg-2:
125 remove {tuber::set::%{_u}%} from {tubers::*}
126 set {tuber::set::%{_u}%} to arg-2
127 add arg-2 to {tubers::*}
128 send "{@pre} &7You have successfully renamed your channel to &c%arg-2%"
129 else:
130 send "{@pre} &7That name is already taken."
131 else:
132 send "{@pre} &7The maximum name for a channel is 20 characters."
133 else:
134 send "{@pre} &7The minimum name for a channel is 2 characters"
135 else:
136 send "{@pre} &7You don't have a channel."
137 else:
138 send "{@pre} &7Please provide a name."
139
140function cDelete(p: player):
141 set {_u} to uuid of {_p}
142 set {_c} to {tuber::set::%{_u}%}
143 delete {tuber::manager::%{_u}%}
144 delete {tuber::managerIncome::%{_u}%}
145 delete {tuber::owner::%{_c}%}
146 delete {tuber::set::%{_u}%}
147 delete {tuber::creation::%{_u}%}
148 delete {tuber::desc::%{_u}%}
149 delete {tuber::subs::%{_u}%}
150 delete {tuber::views::%{_u}%}
151 delete {tuber::cooldown::%{_u}%}
152 delete {tuber::recording::%{_u}%}
153 delete {tuber::editing::%{_u}%}
154 delete {tuber::wifi::%{_u}%}
155 delete {tuber::income::%{_u}%}
156
157
158 delete {tuber::confirm::%{_u}%}
159 remove {_c} from {tubers::*}
160 clear {tuber::videos::%{_u}%::*}
161 send "{@pre} &7Successfully deleted your channel." to {_p}
162
163function cgCreate(p: player):
164 set {_u} to uuid of {_p}
165 set {chatCreate::%{_u}%} to true
166 send "{@pre} &7Please type a name for your channel. Type &ccancel&7 if you want to cancel." to {_p}
167
168function cCreate(p: player, t: text):
169 if length of {_t} > 2:
170 if length of {_t} < 20:
171 set {_u} to uuid of {_p}
172 set {tuber::set::%{_u}%} to {_t}
173 set {tuber::owner::%{_t}%} to {_p}
174 set {tuber::creation::%{_u}%} to now
175 set {tuber::desc::%{_u}%} to "N/A"
176 set {tuber::subs::%{_u}%} to 0
177 set {tuber::views::%{_u}%} to 0
178 set {tuber::cooldown::%{_u}%} to now
179 set {tuber::recording::%{_u}%} to 20
180 set {tuber::editing::%{_u}%} to 30
181 set {tuber::wifi::%{_u}%} to 10
182 set {tuber::income::%{_u}%} to 10
183 set {tuber::alert::%{_u}%} to true
184 set {tuber::vSubs::%{_u}%} to 1
185
186 add {_t} to {tubers::*}
187 send "{@pre} &7You have created a channel named &c%{_t}%&7." to {_p}
188 else:
189 send "{@pre} &7The maximum name for a channel is 20 characters." to {_p}
190 else:
191 send "{@pre} &7The minimum name for a channel is 2 characters" to {_p}
192
193on chat:
194 if {chatCreate::%uuid of player%} is set:
195 if message is not "cancel":
196 if length of message < {@maxName}:
197 cancel event
198 execute player command "/tuber create %message%"
199 delete {chatCreate::%uuid of player%}
200 else:
201 send "{@pre} &7Sorry but the maximum character amount for the channel is &c{@pre}&7."
202 else:
203 cancel event
204 delete {chatCreate::%uuid of player%}
205 send "{@pre} &7You have successfully canceled it."
206
207# View videos
208
209function page(p: player, page: number):
210 set {_u} to uuid of {_p}
211 set {_pageStart} to 45*{_page}
212 set {_i} to 1
213 set {_a} to 0
214 open virtual chest inventory with size 6 named "&c&LVIDEOS &7&oPage %{_page} + 1%" to {_p}
215 wait 2 ticks
216 loop {tuber::videos::%{_u}%::*}:
217 (loop-index parsed as integer) > {_pageStart}
218 set {_video} to loop-value
219 set {_views} to {tuber::vidViews::%{_u}%::%{_video}%}
220 format gui slot {_a} of {_p} with paper named "&7%loop-value%" with lore "&7Views &8- &c%{tuber::vidViews::%{_u}%::%{_video}%}%", "&7Type &8- &c%{tuber::type::%{_u}%::%{_video}%}%" and "&7&oClick to delete this video" to run:
221 delete({_p}, {_video})
222 add 1 to {_a}
223 if {_a} = ((45*{_i})):
224 exit loop
225 format gui slot 49 of {_p} with book named "&eMain Page" to run:
226 execute {_p} command "/tuber"
227 if (amount of {tuber::videos::%{_u}%::*}) > {_pageStart} + 45:
228
229 format gui slot 53 of {_p} with arrow named "&9Next Page" to run:
230 set {_page} to {_page} + 1
231 page({_p}, {_page})
232 if {_page} > 0:
233 format gui slot 45 of {_p} with arrow named "&9Previous Page" to run:
234 set {_page} to {_page} - 1
235 page({_p}, {_page})
236
237function delete(p: player, t: text):
238 set {_u} to uuid of {_p}
239 remove {_t} from {tuber::videos::%{_u}%::*}
240 delete {tuber::vidViews::%{_u}%::%{_t}%}
241 page({_p}, 0)
242
243# Video Making
244
245on load:
246 clear {game::list::*}
247 add "Wackman" to {game::list::*}
248 add "Super Bob" to {game::list::*}
249 add "Bloxers" to {game::list::*}
250 add "Rota" to {game::list::*}
251 add "7 nights at Lesly's" to {game::list::*}
252 add "Larry's Mod" to {game::list::*}
253 add "Cave Game" to {game::list::*}
254 add "Shooter Go" to {game::list::*}
255 add "Shooter Royale" to {game::list::*}
256 add "Theft Wars" to {game::list::*}
257 add "Trashnite" to {game::list::*}
258 add "Immortal Fight" to {game::list::*}
259 add "Ninja's Creed" to {game::list::*}
260 add "Beague of Legends" to {game::list::*}
261 add "Happy Cars" to {game::list::*}
262 add "Overlook" to {game::list::*}
263 add "PBA 2K17" to {game::list::*}
264
265function record(p: player, n: number):
266 loop 60 times:
267 send action bar "&fRecording a video... &a&o(%{_n}% seconds)" to {_p}
268 remove 1 from {_n}
269 if {_n} <= 0:
270 stop loop
271 wait 1 second
272
273function edit(p: player, n: number):
274 loop 60 times:
275 send action bar "&fEditing the video... &a&o(%{_n}% seconds)" to {_p}
276 remove 1 from {_n}
277 if {_n} <= 0:
278 stop loop
279 wait 1 second
280
281function publish(p: player, n: number):
282 loop 60 times:
283 send action bar "&fPublishing finished video on &c&nTU&4&nBE&f... &a&o(%{_n}% seconds)" to {_p}
284 remove 1 from {_n}
285 if {_n} <= 0:
286 stop loop
287 wait 1 second
288
289function vCreate(p: player, t: text, game: text):
290 if length of {_t} <= 30:
291 set {_u} to uuid of {_p}
292 set {_record} to {tuber::recording::%{_u}%}
293 set {_edit} to {tuber::editing::%{_u}%}
294 set {_publish} to {tuber::wifi::%{_u}%}
295 set {_n} to {_record}
296
297 set {_waited} to difference between {tuber::cooldown::%{_u}%} and now
298 if ("%{_waited}%" parsed as timespan) < 45 seconds:
299 send "&7You have to wait &c%difference between 45 seconds and {_waited}% &7to make another video." to {_p}
300 stop
301 else:
302 send "{@pre} &7Setting stuff up for the recording..." to {_p}
303 set {tuber::cooldown::%{_u}%} to now
304 wait 3 seconds
305 record({_p}, {_record})
306 wait ("%{_record}% seconds" parsed as timespan)
307 edit({_p}, {_edit})
308 wait ("%{_edit}% seconds" parsed as timespan)
309 publish({_p}, {_publish})
310 wait ("%{_publish}% seconds" parsed as timespan)
311 wait 1 tick
312 send "" to {_p}
313 send " &7Sucessfully uploaded a video." to {_p}
314 send " &7Title &8- &c%{_t}%" to {_p}
315 send "" to {_p}
316 send " &7Game Type &8- &c%{_game}%" to {_p}
317 send " &7Subscribers Earned &8- &c%{tuber::vSubs::%{_u}%}%" to {_p}
318 send " &7Money Earned &8- &c%{tuber::income::%{_u}%}%" to {_p}
319 send "" to {_p}
320
321 set {_s} to {tuber::vSubs::%{_u}%}
322 set {_m} to {tuber::income::%{_u}%}
323 add {_s} to {tuber::subs::%{_u}%}
324 add {_m} to {balance::%{_u}%}
325 add {_t} to {tuber::videos::%{_u}%::*}
326 set {tuber::type::%{_u}%::%{_t}%} to {_game}
327 set {tuber::vidViews::%{_u}%::%{_t}%} to 0
328 views({_p}, {_t})
329 viralCheck({_p}, {_t}, {_game})
330 else:
331 send "{@pre} &7Sorry, but the video titles has a &c&n30 &7character limit." to {_p}
332
333function views(p: player, v: text):
334 set {_u} to uuid of {_p}
335 set {_subs} to {tuber::subs::%{_u}%}
336 set {_views} to rounded ({_subs}/2)
337 set {_views} to random integer between 1 and {_views}
338 if {_views} >= 1000:
339 chance of 50%:
340 set {_n} to {_views}/1000
341 add {_n} to {balance::%{_u}%}
342 send "&c[Video] &7You gained an extra &c%{_n}%$ &7from your video, &c%{_v}%" to {_p}
343 set {_subscribers} to rounded ({_views}/4)
344 add {_subscribers} to {tuber::subs::%{_u}%}
345 send "&c[Video] &7You gained &c%{_subscribers}% subs &7from your latest video named &c%{_v}%&7.." to {_p}
346 add {_views} to {tuber::vidViews::%{_u}%::%{_v}%}
347 add {_views} to {tuber::views::%{_u}%}
348 send action bar "&7Your video gained &c%{_views}% &7view/s after you uploaded it!" to {_p}
349
350every 5 minutes:
351 set {viral} to random element out of {game::list::*}
352 execute console command "/hd setline viral 3 &a%{viral}%"
353
354function viralCheck(p: player, t: text, g: text):
355 set {_u} to uuid of {_p}
356 if {viral} contains {_g}:
357 set {_chance} to random integer between 1 and 10
358 if {_chance} is 5:
359 set {_subs} to random integer between 1000 and 5000
360 set {_views} to (rounded ({_subs}/2))
361 add {_subs} to {tuber::subs::%{_u}%}
362 add {_views} to {tuber::vidViews::%{_u}%::%{_t}%}
363 add {_views} to {tuber::views::%{_u}%}
364 send "&c[Viral] &7Your video, &c&n%{_t}%&7&o(%{_g}%)&7, went viral and you gained &c&n%{_subs}% &7subscribers and &c&n%{_views}% views &7on your video!!" to {_p}
365 else:
366 set {_chance} to random integer between 1 and 15
367 if {_chance} is 1:
368 set {_subs} to random integer between 1000 and 7000
369 set {_views} to (rounded ({_subs}/2))
370 add {_subs} to {tuber::subs::%{_u}%}
371 add {_views} to {tuber::vidViews::%{_u}%::%{_t}%}
372 add {_views} to {tuber::views::%{_u}%}
373 send "&c[Viral] &7Your video, &c&n%{_t}%&7&o(%{_g}%)&7, went viral and you gained &c&n%{_subs}% &7subscribers and &c&n%{_views}% views &7on your video!!" to {_p}
374
375options:
376 cost: &7Cost &8- &a$
377
378function chooseGame(p: player):
379 set {_u} to uuid of {_p}
380 add "Wackman" to {games::%{_u}%::*} if {games::%{_u}%::*} is not set
381 open virtual chest inventory with size 5 named "&c&nYour&7 Game List." to {_p}
382 format gui slot 4 of {_p} with green glass pane named "&fOthers &7&o(Vlogs, Random Stuff)" to close then run function vgCreate({_p}, "Others")
383 if {games::%{_u}%::*} contains "Wackman":
384 format gui slot 10 of {_p} with paper named "&fPlay &c&nWackMan" to close then run function vgCreate({_p}, "Wackman")
385 else:
386 format gui slot 10 of {_p} with red glass pane named "&cBuy Wackman" with lore "{@cost}250" to close then run function buyGame({_p}, "Wackman", 250)
387
388 if {games::%{_u}%::*} contains "Super Bob":
389 format gui slot 11 of {_p} with paper named "&fPlay &c&nSuper Bob" to close then run function vgCreate({_p}, "Super Bob")
390 else:
391 format gui slot 11 of {_p} with red glass pane named "&cBuy Super Bob" with lore "{@cost}500" to close then run function buyGame({_p}, "Super Bob", 500)
392
393 if {games::%{_u}%::*} contains "Bloxers":
394 format gui slot 12 of {_p} with paper named "&fPlay &c&nBloxers" to close then run function vgCreate({_p}, "Bloxers")
395 else:
396 format gui slot 12 of {_p} with red glass pane named "&cBuy Bloxers" with lore "{@cost}500" to close then run function buyGame({_p}, "Bloxers", 500)
397
398 if {games::%{_u}%::*} contains "Rota":
399 format gui slot 13 of {_p} with paper named "&fPlay &c&nRota" to close then run function vgCreate({_p}, "Rota")
400 else:
401 format gui slot 13 of {_p} with red glass pane named "&cBuy Rota" with lore "{@cost}750" to close then run function buyGame({_p}, "Rota", 750)
402
403 if {games::%{_u}%::*} contains "7 nights at Lesly's":
404 format gui slot 14 of {_p} with paper named "&fPlay &c&n7 nights at Lesly's" to close then run function vgCreate({_p}, "7 nights at Lesly's")
405 else:
406 format gui slot 14 of {_p} with red glass pane named "&cBuy 7 nights at Lesly's" with lore "{@cost}1000" to close then run function buyGame({_p}, "7 nights at Lesly's", 1000)
407
408 if {games::%{_u}%::*} contains "Larry's Mod":
409 format gui slot 15 of {_p} with paper named "&fPlay &c&nLarry's Mod" to close then run function vgCreate({_p}, "Larry's Mod")
410 else:
411 format gui slot 15 of {_p} with red glass pane named "&cBuy Larry's Mod" with lore "{@cost}1500" to close then run function buyGame({_p}, "Larry's Mod", 1500)
412
413 if {games::%{_u}%::*} contains "Cave Game":
414 format gui slot 16 of {_p} with paper named "&fPlay &c&nCave Game" to close then run function vgCreate({_p}, "Cave Game")
415 else:
416 format gui slot 16 of {_p} with red glass pane named "&cBuy Cave Game" with lore "{@cost}3000" to close then run function buyGame({_p}, "Cave Game", 3000)
417
418 if {games::%{_u}%::*} contains "Shooter Go":
419 format gui slot 19 of {_p} with paper named "&fPlay &c&nShooter Go" to close then run function vgCreate({_p}, "Shooter Go")
420 else:
421 format gui slot 19 of {_p} with red glass pane named "&cBuy Shooter Go" with lore "{@cost}4000" to close then run function buyGame({_p}, "Shooter Go", 4000)
422
423 if {games::%{_u}%::*} contains "Shooter Royale":
424 format gui slot 20 of {_p} with paper named "&fPlay &c&nShooter Royale" to close then run function vgCreate({_p}, "Shooter Royale")
425 else:
426 format gui slot 20 of {_p} with red glass pane named "&cBuy Shooter Royale" with lore "{@cost}5000" to close then run function buyGame({_p}, "Shooter Royale", 5000)
427
428 if {games::%{_u}%::*} contains "Theft Wars":
429 format gui slot 21 of {_p} with paper named "&fPlay &c&nTheft Wars" to close then run function vgCreate({_p}, "Theft Wars")
430 else:
431 format gui slot 21 of {_p} with red glass pane named "&cBuy Theft Wars" with lore "{@cost}7500" to close then run function buyGame({_p}, "Theft Wars", 7500)
432
433 if {games::%{_u}%::*} contains "Trashnite":
434 format gui slot 22 of {_p} with paper named "&fPlay &c&nTrashnite" to close then run function vgCreate({_p}, "Trashnite")
435 else:
436 format gui slot 22 of {_p} with red glass pane named "&cBuy Trashnite" with lore "{@cost}10,000" to close then run function buyGame({_p}, "Trashnite", 10000)
437
438 if {games::%{_u}%::*} contains "Immortal Fight":
439 format gui slot 23 of {_p} with paper named "&fPlay &c&nImmortal Fight" to close then run function vgCreate({_p}, "Immortal Fight")
440 else:
441 format gui slot 23 of {_p} with red glass pane named "&cBuy Immortal Fight" with lore "{@cost}12,500" to close then run function buyGame({_p}, "Immortal Fight", 12500)
442
443 if {games::%{_u}%::*} contains "Ninja's Creed":
444 format gui slot 24 of {_p} with paper named "&fPlay &c&nNinja's Creed" to close then run function vgCreate({_p}, "Ninja's Creed")
445 else:
446 format gui slot 24 of {_p} with red glass pane named "&cBuy Ninja's Creed" with lore "{@cost}14,000" to close then run function buyGame({_p}, "Ninja's Creed", 14000)
447
448 if {games::%{_u}%::*} contains "Beague Of Legends":
449 format gui slot 25 of {_p} with paper named "&fPlay &c&nBeague Of Legends" to close then run function vgCreate({_p}, "Beague Of Legends")
450 else:
451 format gui slot 25 of {_p} with red glass pane named "&cBuy Beague Of Legends" with lore "{@cost}16,000" to close then run function buyGame({_p}, "Beague Of Legends", 16000)
452
453 if {games::%{_u}%::*} contains "Happy Cars":
454 format gui slot 30 of {_p} with paper named "&fPlay &c&nHappy Cars" to close then run function vgCreate({_p}, "Happy Cars")
455 else:
456 format gui slot 30 of {_p} with red glass pane named "&cBuy Happy Cars" with lore "{@cost}18,000" to close then run function buyGame({_p}, "Happy Cars", 18000)
457
458 if {games::%{_u}%::*} contains "Overlook":
459 format gui slot 31 of {_p} with paper named "&fPlay &c&nOverlook" to close then run function vgCreate({_p}, "Overlook")
460 else:
461 format gui slot 31 of {_p} with red glass pane named "&cBuy Overlook" with lore "{@cost}20,000" to close then run function buyGame({_p}, "Overlook", 20000)
462
463 if {games::%{_u}%::*} contains "PBA 2K19":
464 format gui slot 32 of {_p} with paper named "&fPlay &c&nPBA 2K19" to close then run function vgCreate({_p}, "PBA 2K19")
465 else:
466 format gui slot 32 of {_p} with red glass pane named "&cBuy PBA 2K19" with lore "{@cost}25,000" to close then run function buyGame({_p}, "PBA 2K19", 25000)
467
468function buyGame(p: player, g: text, c: number):
469 set {_u} to uuid of {_p}
470 if {balance::%{_u}%} >= {_c}:
471 remove {_c} from {balance::%{_u}%}
472 add {_g} to {games::%{_u}%::*}
473 send "&c[Games] &7Successfully bought &c&n%{_g}%&7..." to {_p}
474 chooseGame({_p})
475 else:
476 set {_needed} to {_c} - {balance::%{_u}%}
477 send "&c[Games] &7You need &c&n%{_needed}% &7to buy &c&n%{_g}%&7..." to {_p}
478
479function vgCreate(p: player, g: text):
480 set {_u} to uuid of {_p}
481 set {chatRecord::%{_u}%} to {_g}
482 send "{@pre} &7Please type a name for your new video. Type &ccancel&7 if you want to cancel." to {_p}
483
484on chat:
485 if {chatRecord::%uuid of player%} is set:
486 if message does not contain "cancel":
487 if {tuber::videos::%uuid of player%::*} does not contain message:
488 cancel event
489 set {_game} to {chatRecord::%uuid of player%}
490 vCreate(player, message, {_game})
491 delete {chatRecord::%uuid of player%}
492 send "{@pre} &7Creating a video called &c%message%&7..."
493 else:
494 send "{@pre} &7Theres already a video in your video list with that same name."
495 else:
496 cancel event
497 delete {chatRecord::%uuid of player%}
498 send "{@pre} &7You have successfully canceled it."
499
500# Shop Feature
501
502function tShop(p: player):
503 set {_u} to uuid of {_p}
504 open virtual chest inventory with size 3 named "&3&lSHOP &7&o(%{balance::%{_u}%}%)" to {_p}
505 format gui slot 11 of {_p} with ("Camera" parsed as offline player)'s skull named "&6&nCAMERA&7 Shop" with lore "&7Buy Cameras here!" and "&7&o(Will shorten Recording time)" to run function camera({_p})
506 format gui slot 13 of {_p} with ("zasf" parsed as offline player)'s skull named "&6&nGPU&7 Shop" with lore "&7Buy GPUs here!" and "&7&o(Will shorten Editing time)" to run function gpu({_p})
507 format gui slot 15 of {_p} with ("MorganeFR" parsed as offline player)'s skull named "&6&nWIFI&7 Shop" with lore "&7Buy a better Wifi here!" and "&7&o(Will shorten publishing time)" to run function wifi({_p})
508 format gui slot 18 of {_p} with arrow named "&7Go back" to run {_p} command "/t"
509
510function camera(p: player):
511 set {_u} to uuid of {_p}
512 open virtual chest inventory with size 3 named "&6&nCAMERA&7 Shop" to {_p}
513 format gui slot 10 of {_p} with ("Camera" parsed as offline player)'s skull named "&fWanon" with lore "&8*&7Will reduce recording time to 18s" and "&7Cost&8: &a$100" to run function buycamera({_p}, "Wanon", 18, 100)
514 format gui slot 11 of {_p} with ("SecurityCamera" parsed as offline player)'s skull named "&fMikon" with lore "&8*&7Will reduce recording time to 16s" and "&7Cost&8: &a$500" to run function buycamera({_p}, "Mikon", 16, 500)
515 format gui slot 12 of {_p} with ("Camera" parsed as offline player)'s skull named "&fSoney" with lore "&8*&7Will reduce recording time to 14s" and "&7Cost&8: &a$1000" to run function buycamera({_p}, "Soney", 14, 1000)
516 format gui slot 13 of {_p} with ("3i5g00d" parsed as offline player)'s skull named "&fOlympian" with lore "&8*&7Will reduce recording time to 12s" and "&fCost&8: &a$1750" to run function buycamera({_p}, "Olympian", 12, 1750)
517 format gui slot 14 of {_p} with ("Camera" parsed as offline player)'s skull named "LGE" with lore "&8*&7Will reduce recording time to 10s" and "&fCost&8: &a$2500" to run function buycamera({_p}, "LGE", 10, 2500)
518 format gui slot 15 of {_p} with ("SecurityCamera" parsed as offline player)'s skull named "&fWeica" with lore "&8*&7Will reduce recording time to 8s" and "&fCost&8: &a$4000" to run function buycamera({_p}, "Weica", 8, 4000)
519 format gui slot 16 of {_p} with ("Camera" parsed as offline player)'s skull named "&fGoNoob" with lore "&8*&7Will reduce recording time to 6s" and "&fCost&8: &A$7500" to run function buycamera({_p}, "GoNoob", 6, 7500)
520 format gui slot 18 of {_p} with arrow named "&7Go back" to run function tShop({_p})
521
522options:
523 edit: &8*&7Will reduce editing time to
524 cost: &fCost&8: &a$
525 wifi: &8*&7Will reduce publishing time to
526
527function wifi(p: player):
528 set {_u} to uuid of {_p}
529 open virtual chest inventory with size 3 named "&6&nWifi&7 Shop" to {_p}
530 format gui slot 10 of {_p} with ("jdogduffy" parsed as offline player)'s skull named "&fAmplifia" with lore "{@wifi} 9s" and "{@cost}250" to run function buywifi({_p}, "Amplifia", 9, 250)
531 format gui slot 11 of {_P} with ("Zen9400" parsed as offline player)'s skull named "&fBluero" with lore "{@wifi} 8s" and "{@cost}500" to run function buywifi({_p}, "Bluero", 8, 500)
532 format gui slot 12 of {_p} with ("MorganeFR" parsed as offline player)'s skull named "&fT-Link" with lore "{@wifi} 7s" and "{@cost}750" to run function buywifi({_p}, "T-Link", 7, 750)
533 format gui slot 13 of {_p} with ("GoOnReportMe" parsed as offline player)'s skull named "&fTS-Link" with lore "{@wifi} 6s" and "{@cost}1000" to run function buywifi({_p}, "TS-Link", 6, 1000)
534 format gui slot 14 of {_p} with ("EladYat" parsed as offline player)'s skull named "&fGetty" with lore "{@wifi} 5s" and "{@cost}1500" to run function buywifi({_p}, "Getty", 5, 1500)
535 format gui slot 15 of {_p} with ("Alistor" parsed as offline player)'s skull named "&fSamsong" with lore "{@wifi} 4s" and "{@cost}2250" to run function buywifi({_p}, "Samsong", 4, 2250)
536 format gui slot 16 of {_P} with ("Addelburgh" parsed as offline player)'s skull named "&fWoogle" with lore "{@wifi} 3s" and "{@cost}3000" to run function buywifi({_p}, "Woogle", 3, 3000)
537 format gui slot 18 of {_p} with arrow named "&7Go back" to run function tShop({_p})
538
539function buywifi(p: player, name: text, time: number, cost: number):
540 set {_u} to uuid of {_p}
541 if {balance::%{_u}%} >= {_cost}:
542 remove {_cost} from {balance::%{_u}%}
543 set {tuber::wifi::%{_u}%} to {_time}
544 send "&c[WIFI] &7Successfully bought &c&n%{_name}%&7, shortening your publising time to %{_time}% seconds" to {_p}
545 else:
546 set {_needed} to {_cost} - {balance::%{_u}%}
547 send "&c[WIFI] &7Sorry, but you need &c&n%{_needed}%$&7 to make this purchase." to {_p}
548
549function gpu(p: player):
550 set {_u} to uuid of {_p}
551 open virtual chest inventory with size 3 named "&6&nGPU&7 Shop" to {_p}
552 format gui slot 10 of {_p} with ("jdogduffy" parsed as offline player)'s skull named "&fAwus" with lore "{@edit} 27s" and "{@cost}500" to run function buygpu({_p}, "Awus", 27, 500)
553 format gui slot 11 of {_P} with ("Zen9400" parsed as offline player)'s skull named "&fLSI" with lore "{@edit} 24s" and "{@cost}1250" to run function buygpu({_p}, "LSI", 24, 1250)
554 format gui slot 12 of {_p} with ("MorganeFR" parsed as offline player)'s skull named "&fMegaBite" with lore "{@edit} 21s" and "{@cost}2000" to run function buygpu({_p}, "MegaBite", 21, 2000)
555 format gui slot 13 of {_p} with ("GoOnReportMe" parsed as offline player)'s skull named "&fZodiac" with lore "{@edit} 18s" and "{@cost}3500" to run function buygpu({_p}, "Zodiac", 18, 3500)
556 format gui slot 14 of {_p} with ("EladYat" parsed as offline player)'s skull named "&fLazuli" with lore "{@edit} 15s" and "{@cost}5000" to run function buygpu({_p}, "Lazuli", 15, 5000)
557 format gui slot 15 of {_p} with ("Alistor" parsed as offline player)'s skull named "&fVidian" with lore "{@edit} 12s" and "{@cost}7000" to run function buygpu({_p}, "Vidian", 12, 7000)
558 format gui slot 16 of {_P} with ("Addelburgh" parsed as offline player)'s skull named "&fBobiard" with lore "{@edit} 10s" and "{@cost}10,000" to run function buygpu({_p}, "Bobiard", 10, 10000)
559 format gui slot 18 of {_p} with arrow named "&7Go back" to run function tShop({_p})
560
561function buygpu(p: player, name: text, time: number, cost: number):
562 set {_u} to uuid of {_p}
563 if {balance::%{_u}%} >= {_cost}:
564 remove {_cost} from {balance::%{_u}%}
565 set {tuber::editing::%{_u}%} to {_time}
566 send "&c[GPU] &7Successfully bought &c&n%{_name}%&7, shortening your editing time to %{_time}% seconds" to {_p}
567 else:
568 set {_needed} to {_cost} - {balance::%{_u}%}
569 send "&c[GPU] &7Sorry, but you need &c&n%{_needed}%$&7 to make this purchase." to {_p}
570
571function buycamera(p: player, name: text, time: number, cost: number):
572 set {_u} to uuid of {_p}
573 if {balance::%{_u}%} >= {_cost}:
574 remove {_cost} from {balance::%{_u}%}
575 set {tuber::recording::%{_u}%} to {_time}
576 send "&c[Camera] &7Successfully bought &c&n%{_name}%&7, shortening your recording time to %{_time}% seconds" to {_p}
577 else:
578 set {_needed} to {_cost} - {balance::%{_u}%}
579 send "&c[Camera] &7Sorry, but you need &c&n%{_needed}%$&7 to make this purchase." to {_p}
580
581# Leaderboard
582
583function sTop(p: player):
584 set {_top} to 10
585
586 open virtual chest inventory with size 3 named "&7Most &c&lSUBSCRIBED &7Channels" to {_p}
587 set {_top::*} to sorted {tuber::subs::*} from highest to lowest with format "@index"
588
589 set {_n1} to 9
590
591 loop {_top::*}:
592 set {_player} to loop-value parsed as offline player
593 set {_u} to uuid of {_player}
594
595 format gui slot {_n1} of {_p} with skull of {_player} named "&c%loop-index%## &7%{_player}%" with lore "&7Subscribers &8- &c%{tuber::subs::%{_u}%}%"
596 format gui slot 18 of {_p} with arrow named "&7Go back" to run function top({_p})
597
598
599 if {_n1} = 18:
600 set {_n1} to 22
601
602 add 1 to {_n1}
603 add 1 to {_n}
604
605 if {_n} is {_top}:
606 stop loop
607
608function vTop(p: player):
609 set {_top} to 10
610
611 open virtual chest inventory with size 3 named "&7Most &e&lVIEWED &7Channels" to {_p}
612 set {_top::*} to sorted {tuber::views::*} from highest to lowest with format "@index"
613
614 set {_n1} to 9
615
616 loop {_top::*}:
617 set {_player} to loop-value parsed as offline player
618 set {_u} to uuid of {_player}
619
620 format gui slot {_n1} of {_p} with skull of {_player} named "&c%loop-index%## &7%{_player}%" with lore "&7Total Views &8- &c%{tuber::views::%{_u}%}%"
621 format gui slot 18 of {_p} with arrow named "&7Go back" to run function top({_p})
622
623 if {_n1} = 18:
624 set {_n1} to 22
625
626 add 1 to {_n1}
627 add 1 to {_n}
628
629 if {_n} is {_top}:
630 stop loop
631
632function bTop(p: player):
633 set {_top} to 10
634
635 open virtual chest inventory with size 3 named "&a&lRichest &7Tubers" to {_p}
636 set {_top::*} to sorted {balance::*} from highest to lowest with format "@index"
637
638 set {_n1} to 9
639
640 loop {_top::*}:
641 set {_player} to loop-value parsed as offline player
642 set {_u} to uuid of {_player}
643
644 format gui slot {_n1} of {_p} with skull of {_player} named "&c%loop-index%## &7%{_player}%" with lore "&7Money &8- &c%{balance::%{_u}%}%"
645 format gui slot 18 of {_p} with arrow named "&7Go back" to run function top({_p})
646
647 if {_n1} = 18:
648 set {_n1} to 22
649
650 add 1 to {_n}
651 add 1 to {_n1}
652
653 if {_n} is {_top}:
654 stop loop
655
656function top(p: player):
657 open virtual chest inventory with size 3 named "&6&lLEADERBOARDS" to {_p}
658 format gui slot 11 of {_p} with skull of ("0ff_White" parsed as offline player) named "&7Most &c&LSUBSCRIBED &7Channels" with lore "&7Check out the channel with the most subscribers" to run function sTop({_p})
659 format gui slot 13 of {_p} with skull of ("Viktorq" parsed as offline player) named "&7Most &e&LVIEWED &7Channel" with lore "&7Check out the most viewed channel" to run function vTop({_p})
660 format gui slot 15 of {_p} with skull of ("Floyds" parsed as offline player) named "&a&lRICHEST &7Tubers" with lore "&7Check out the richest tubers" to run function bTop({_p})
661 format gui slot 18 of {_p} with arrow named "&7Go Back." to run {_p} command "/channel"
662
663# Managers
664
665function managers(p: player):
666 set {_u} to uuid of {_p}
667 open virtual chest inventory with size 3 named "&c&LMANAGERS &7&o(%{tuber::manager::%{_u}%}%)" to {_p} if {tuber::manager::%{_u}%} is set
668 open virtual chest inventory with size 3 named "&c&LMANAGERS" to {_p} if {tuber::manager::%{_u}%} is not set
669 format gui slot 4 of {_p} with red glass pane named "&c&nFire your current manager!" with lore "&7Click to fire your current manager." to run:
670 if {tuber::manager::%{_u}%} is set:
671 send "&c[Manager] &7Successfully fired &c&n%{tuber::manager::%{_u}%}%&7..."
672 delete {tuber::manager::%{_u}%}
673 delete {tuber::managerincome::%{_u}%}
674 set {tuber::income::%{_u}%} to 10
675 set {tuber::vSubs::%{_u}%} to 1
676 else:
677 send "&c[Manager] &7You do not have any manager at the time."
678 format gui slot 10 of {_p} with ("CarlosZikzex" parsed as offline player)'s skull named "&fOliver" with lore "", "&7Gain 5 subs per video", "&7Gain 30$ per video", "&7Income&8: &f$50" and "" to run function hiremanager({_p}, "Oliver", 50, 5, 30)
679 format gui slot 11 of {_p} with ("TheSkyWarrior" parsed as offline player)'s skull named "&fJack" with lore "", "&7Gain 15 subs per video", "&7Gain 50$ per video", "&7Income&8: &f$100" and "" to run function hiremanager({_p}, "Jack", 150, 15, 50)
680 format gui slot 12 of {_p} with ("Matti" parsed as offline player)'s skull named "&fHarry" with lore "", "&7Gain 35 subs per video", "&7Gain 250$ per video", "&7Income&8: &f$300" and "" to run function hiremanager({_p}, "Harry", 350, 35, 250)
681 format gui slot 13 of {_p} with ("septicArcanist" parsed as offline player)'s skull named "&fJacob" with lore "", "&7Gain 60 subs per video", "&7Gain 400$ per video", "&7Income&8: &f$500" and "" to run function hiremanager({_p}, "Jacob", 800, 60, 500)
682 format gui slot 14 of {_p} with ("BR4ZZ3RS" parsed as offline player)'s skull named "&fCharlie" with lore "", "&7Gain 100 subs per video", "&7Gain 800$ per video", "&7Income&8: &f$1000" and "" to run function hiremanager({_p}, "Charlie", 1500, 100, 1000)
683 format gui slot 15 of {_p} with ("banny_CZE" parsed as offline player)'s skull named "&fThomas" with lore "", "&7Gain 250 subs per video", "&7Gain 1250$ per video", "&7Income&8: &f$1500" and "" to run function hiremanager({_p}, "Thomas", 2000, 250, 1500)
684 format gui slot 16 of {_p} with ("Miraculous" parsed as offline player)'s skull named "&fBob" with lore "", "&7Gain 500 subs per video", "&7Gain 1500$ per video", "&7Income&8: &f$2000" and "" to run function hiremanager({_p}, "Bob", 3500, 500, 2500)
685 format gui slot 18 of {_p} with arrow named "&7Go back." to execute {_p} command "/c"
686
687# function hiremanager(player, manager, cost, subs, money)
688function hiremanager(p: player, t: text, c: number, s: number, m: number):
689 set {_u} to uuid of {_p}
690 if {_t} does not contain "%{tuber::manager::%{_u}%}%":
691 if {balance::%{_u}%} >= {_c}:
692 set {tuber::income::%{_u}%} to {_m}
693 set {tuber::vSubs::%{_u}%} to {_s}
694 set {tuber::manager::%{_u}%} to {_t}
695 set {tuber::managerincome::%{_u}%} to {_c}
696 send "&c[Manager] &7Successfully hired &c&n%{_t}%&7 as your manager." to {_p}
697 remove {_c} from {balance::%{_u}%}
698 else:
699 send "&c[Manager] &7You need &c&n%{_c}%$ &7to hire &c&n%{_t}%&7." to {_p}
700 else:
701 send "&c[Manager] &7You already have &c&n%{_t}% &7as your manager." to {_P}
702
703function income():
704 loop all players:
705 set {_p} to loop-player
706 set {_u} to uuid of {_p}
707 if {tuber::manager::%{_u}%} is set:
708 set {_c} to {tuber::managerincome::%{_u}%}
709 if {balance::%{_u}%} >= {_c}:
710 remove {_c} from {balance::%{_u}%}
711 send "&c[Manager] &c&n%{_C}%$ &7has been taken from you as an income for &c%{tuber::manager::%{_u}%}%&7." to {_p}
712 else:
713 send "&c[Manager] &7Your manager, &c&n%{tuber::manager::%{_u}%}% &7has resigned, since you weren't able to give him his required income of &c&n%{_c}%&7. You may hire him again once you have enough." to {_p}
714 set {tuber::income::%{_u}%} to 10
715 set {tuber::vSubs::%{_u}%} to 1
716 delete {tuber::manager::%{_u}%}
717 delete {tuber::managerincome::%{_u}%}
718
719# Black Market
720
721function bM(p: player):
722 set {_u} to uuid of {_p}
723 open virtual chest inventory with size 4 named "&0&lBLACK MARKET" to {_p}
724 format gui slot 10 of {_p} with nether star named "&c&n+1 &fsub" with lore "&fPrice&8: &c&n250$" to run function buysubs({_p}, 1, 250)
725 format gui slot 11 of {_p} with nether star named "&c&n+3 &fsubs" with lore "&fPrice&8: &c&n750$" to run function buysubs({_p}, 3, 750)
726 format gui slot 12 of {_p} with nether star named "&c&n+5 &fsubs" with lore "&fPrice&8: &c&n1250$" to run function buysubs({_p}, 5, 1250)
727 format gui slot 13 of {_p} with nether star named "&c&n+15 &fsubs" with lore "&fPrice&8: &c&n3750$" to run function buysubs({_p}, 10, 3750)
728 format gui slot 14 of {_p} with nether star named "&c&n+30 &fsubs" with lore "&fPrice&8: &c&n7500$" to run function buysubs({_p}, 20, 7500)
729 format gui slot 15 of {_p} with nether star named "&c&n+50 &fsubs" with lore "&fPrice&8: &c&n12500$" to run function buysubs({_p}, 50, 12500)
730 format gui slot 16 of {_p} with nether star named "&c&n+100 &fsubs" with lore "&fPrice&8: &c&n25000$" to run function buysubs({_p}, 100, 25000)
731 format gui slot 19 of {_p} with eye of ender named "&a&n+10 &fviews" with lore "&fPrice&8: &c&n200$" to run function buyviews({_p}, 10, 200, 0)
732 format gui slot 20 of {_p} with eye of ender named "&a&n+30 &fviews" with lore "&fPrice&8: &c&n600$" to run function buyviews({_p}, 30, 600, 0)
733 format gui slot 21 of {_p} with eye of ender named "&a&n+50 &fviews" with lore "&fPrice&8: &c&n1000$" to run function buyviews({_p}, 50, 1000, 0)
734 format gui slot 22 of {_p} with eye of ender named "&a&n+100 &fviews" with lore "&fPrice&8: &c&n2000$" to run function buyviews({_p}, 100, 2000, 0)
735 format gui slot 23 of {_p} with eye of ender named "&a&n+250 &fviews" with lore "&fPrice&8: &c&n5000$" to run function buyviews({_p}, 250, 2000, 0)
736 format gui slot 24 of {_p} with eye of ender named "&a&n+500 &fviews" with lore "&fPrice&8: &c&n10000$" to run function buyviews({_p}, 500, 10000, 0)
737 format gui slot 25 of {_p} with eye of ender named "&a&n+1000 &fviews" with lore "&fPrice&8: &c&n15000$" to run function buyviews({_p}, 1000, 15000, 0)
738 format gui slot 27 of {_p} with arrow named "&7Go Back" to run {_p} command "/channel"
739
740#function buyviews(player, amount, cost, page)
741function buyviews(p: player, n: number, c: number, page: number):
742 set {_u} to uuid of {_p}
743 set {_pageStart} to 45*{_page}
744 set {_i} to 1
745 set {_a} to 0
746 open virtual chest inventory with size 6 named "&a&nViewBot! &7(Choose a Video) %{_page} + 1%" to {_p}
747 wait 2 ticks
748 loop {tuber::videos::%{_u}%::*}:
749 (loop-index parsed as integer) > {_pageStart}
750 set {_video} to loop-value
751 set {_views} to {tuber::vidViews::%{_u}%::%{_video}%}
752 format gui slot {_a} of {_p} with paper named "&7%loop-value%" with lore "&7Views &8- &c%{tuber::vidViews::%{_u}%::%{_video}%}%", "&7Click to add &c&n%{_n}%&7 &7views" and "&7For &c&n%{_c}%$&7." to run:
753 if {balance::%{_u}%} >= {_c}:
754 remove {_c} from {balance::%{_u}%}
755 add {_n} to {tuber::vidViews::%{_u}%::%{_video}%}
756 add {_n} to {tuber::views::%{_u}%}
757 send "&8[BlackMarket] &7Successfully bought &c&n%{_n}%&7 views for your video, &c&n%{_video}%&7."
758 buyviews({_p}, {_n}, {_c}, {_page})
759 else:
760 set {_needed} to {_c} - {balance::%{_u}%}
761 send "&8[BlackMarket] &7Sorry, but you need &c&n%{_needed}%$ &7to make this purchase." to {_p}
762 add 1 to {_a}
763 if {_a} = ((45*{_i})):
764 exit loop
765 format gui slot 49 of {_p} with book named "&eMain Page" to run:
766 bM({_p})
767 if (amount of {tuber::videos::%{_u}%::*}) > {_pageStart} + 45:
768
769 format gui slot 53 of {_p} with arrow named "&9Next Page" to run:
770 set {_page} to {_page} + 1
771 buyviews({_p}, {_n}, {_c}, {_page})
772 if {_page} > 0:
773 format gui slot 45 of {_p} with arrow named "&9Previous Page" to run:
774 set {_page} to {_page} - 1
775 buyviews({_p}, {_n}, {_c}, {_page})
776
777#function buysubs(player, amount, cost)
778function buysubs(p: player, n: number, c: number):
779 set {_u} to uuid of {_p}
780 if {balance::%{_u}%} >= {_c}:
781 remove {_c} from {balance::%{_u}%}
782 add {_n} to {tuber::subs::%{_u}%}
783 send "&8[BlackMarket] &7Successfully bought &c&n%{_n}%&7 subs..." to {_p}
784 bM({_p})
785 else:
786 set {_needed} to {_c} - {balance::%{_u}%}
787 send "&8[BlackMarket] &7Sorry, but you need &c&n%{_needed}%$ &7to make this purchase." to {_p}
788
789# Visit Feature
790
791function vChat(p: player):
792 set {_u} to uuid of {_p}
793 set {chatVisit::%{_u}%} to true
794 send "{@pre} &7Please enter the name of the player to view their channel. Type &ccancel &7to cancel the request." to {_p}
795
796on chat:
797 if {chatVisit::%uuid of player%} is set:
798 if message does not contain "cancel":
799 cancel event
800 delete {chatVisit::%uuid of player%}
801 execute player command "/t visit %message%"
802 else:
803 cancel event
804 delete {chatVisit::%uuid of player%}
805 send "{@pre} &7You have successfully canceled it."
806
807function visit(p: player, p2: player):
808 set {_u} to uuid of {_p}
809 set {_u2} to uuid of {_p2}
810 set {_channel} to {tuber::set::%{_u2}%}
811 send "%{_p2}% %{_p}% %{_u}% %{_u2}%" to {_p}
812 open virtual chest inventory with size 3 named "&d&lVISIT &7Panel" to {_p}
813 format gui slot 12 of {_p} with {_p2}'s skull named "&c%{_p2}%&7's stats" with lore "&7Channel Creation &8- &c%{tuber::creation::%{_u2}%}%", "&7Description &8- &c%{tuber::desc::%{_u2}%}%", "&7Subscribers &8- &c%{tuber::subs::%{_u2}%}%", "&7Total Views &8- &c%{tuber::views::%{_u2}%}%" and "&7Balance &8- &c%{balance::%{_u2}%}%"
814 format gui slot 14 of {_p} with ("quackerz" parsed as offline player)'s skull named "&a&lVIDEO&7 List" with lore "&7View &c%{_p2}%&7's videos." to run function visitPage({_p}, {_p2}, 0)
815 format gui slot 13 of {_p} with ("GoldBlock" parsed as offline player)'s skull named "&6&lACHIEVEMENTS" to run function achievements({_p}, {_p2})
816
817function achievements(p: player, p2: player):
818 set {_u} to uuid of {_p}
819 set {_u2} to uuid of {_p2}
820 set {_channel} to {tuber::set::%{_u2}%}
821 open virtual chest inventory with size 3 named "&6&lACHIEVEMENTS" to {_p}
822 if {tuber::subs::%{_u2}%} >= 100000:
823 if {tuber::subs::%{_u2}%} < 1000000:
824 if {tuber::subs::%{_u2}%} < 10000000:
825 format gui slot 11 of {_p} with iron ingot named "&fSilver Play Button" with lore "&a&l(AQUIRED)" to do nothing
826 format gui slot 13 of {_p} with gold ingot named "&6Gold Play Button" with lore "&c&l(NOT AQUIRED)" to do nothing
827 format gui slot 15 of {_p} with diamond named "&bDiamond Play Button" with lore "&c&l(NOT AQUIRED)" to do nothing
828 else:
829 format gui slot 11 of {_p} with iron ingot named "&fSilver Play Button" with lore "&a&l(AQUIRED)" to do nothing
830 format gui slot 13 of {_p} with gold ingot named "&6Gold Play Button" with lore "&a&l(AQUIRED)" to do nothing
831 format gui slot 15 of {_p} with diamond named "&bDiamond Play Button" with lore "&a&l(AQUIRED)" to do nothing
832 else:
833 if {tuber::subs::%{_u2}%} <= 10000000:
834 format gui slot 11 of {_p} with iron ingot named "&fSilver Play Button" with lore "&a&l(AQUIRED)" to do nothing
835 format gui slot 13 of {_p} with gold ingot named "&6Gold Play Button" with lore "&a&l(AQUIRED)" to do nothing
836 format gui slot 15 of {_p} with diamond named "&bDiamond Play Button" with lore "&c&l(NOT AQUIRED)" to do nothing
837 else:
838 format gui slot 11 of {_p} with iron ingot named "&fSilver Play Button" with lore "&c&l(NOT AQUIRED)" to do nothing
839 format gui slot 13 of {_p} with gold ingot named "&6Gold Play Button" with lore "&c&l(NOT AQUIRED)" to do nothing
840 format gui slot 15 of {_p} with diamond named "&bDiamond Play Button" with lore "&c&l(NOT AQUIRED)" to do nothing
841
842function visitPage(p: player, p2: player, page: number):
843 set {_u} to uuid of {_p2}
844 set {_pageStart} to 45*{_page}
845 set {_i} to 1
846 set {_a} to 0
847 open virtual chest inventory with size 6 named "&c&LVIDEOS &7&oPage %{_page} + 1%" to {_p}
848 wait 2 ticks
849 loop {tuber::videos::%{_u}%::*}:
850 (loop-index parsed as integer) > {_pageStart}
851 set {_video} to loop-value
852 set {_views} to {tuber::vidViews::%{_u}%::%{_video}%}
853 if {_p} is not op:
854 format gui slot {_a} of {_p} with paper named "&7%loop-value%" with lore "&7Views &8- &c%{tuber::vidViews::%{_u}%::%{_video}%}%" and "&7Type &8- &c%{tuber::type::%{_u}%::%{_video}%}%"
855 else:
856 format gui slot {_a} of {_p} with paper named "&7%loop-value%" with lore "&7Views &8- &c%{tuber::vidViews::%{_u}%::%{_video}%}%", "&7Type &8- &c%{tuber::type::%{_u}%::%{_video}%}%" and "&c&oClick to delete this video &c(Admin)" to run:
857 delete({_p2}, {_video})
858 visitPage({_p}, {_p2}, {_page})
859 add 1 to {_a}
860 if {_a} = ((45*{_i})):
861 exit loop
862 format gui slot 49 of {_p} with book named "&eMain Page" to run:
863 execute {_p} command "/tuber"
864 if (amount of {tuber::videos::%{_u}%::*}) > {_pageStart} + 45:
865
866 format gui slot 53 of {_p} with arrow named "&9Next Page" to run:
867 set {_page} to {_page} + 1
868 visitPage({_p}, {_p2}, {_page})
869 if {_page} > 0:
870 format gui slot 45 of {_p} with arrow named "&9Previous Page" to run:
871 set {_page} to {_page} - 1
872 visitPage({_p}, {_p2}, {_page})
873
874# Live Stream
875
876function livestream(p: player, n: number, t: text, g: text):
877 if {livestreaming::%{_p}%} is not set:
878 set {livestreaming::%{_p}%} to true
879 set {_u} to uuid of {_p}
880 loop 180 times:
881 chance of 50%:
882 set {_subs} to rounded ({tuber::subs::%{_u}%}/3)
883 set {_views} to random integer between 1 and {_subs}
884 send action bar "&d&lLIVE STREAMING &a&o(%{_n}% seconds) &8- &d%{_views}% viewers" to {_p}
885 donation({_p}, {_views})
886
887 remove 1 from {_n}
888 if {_n} <= 0:
889 liveDone({_p}, {_t}, {_g}, {_views})
890 stop loop
891 wait 1 second
892 else:
893 send "&c[LiveStream] &7You cannot livestream since you're currently livestreaming."
894
895function liveDone(p: player, t: text, g: text, views: number):
896 set {_u} to uuid of {_p}
897 send "&d&lLIVE STREAM &7has been ended! and you got &c%{_views}%&7 views." to {_p}
898 add "%{_t}% &6&o(Live Stream)" to {tuber::videos::%{_u}%::*}
899 set {tuber::vidViews::%{_u}%::%{_t}%} to {_views}
900 add {_views} to {tuber::views::%{_u}%}
901 set {tuber::type::%{_u}%::%{_t}%} to {_g}
902
903
904function live(p: player, t: text, g: text):
905 set {_u} to uuid of {_p}
906 if {tuber::videos::%{_u}%::*} does not contain {_t}:
907 send "&aStarting the livestream..." to {_p}
908 livestream({_p}, 120, {_t}, {_g})
909 else:
910 send "&c[Tuber] &7A video or a live stream already exists with that name." to {_p}
911
912function donation(p: player, v: number):
913 set {_u} to uuid of {_p}
914 set {_chance} to rounded ({_views}/2)
915 chance of {_chance}%:
916 set {_n} to "5||10||20||25||30||40||50||69||80||100||500||1000||2500||5000"
917 set {_names} to "Bob||Tom||Jack||Robert||Rob||Clint||Roger||Marc||Adrian||Ivan||Tristan||Carl||Lance"
918 set {_names::*} to {_names} split at "||"
919 set {_numbers::*} to {_n} split at "||"
920 set {_name} to random element out of {_names::*}
921 set {_donation} to random element out of {_numbers::*}
922
923 set {_donation} to {_donation} parsed as number
924 add {_donation} to {balance::%{_u}%}
925 send title "&c&n%{_name}% &7donated &c&n$%{_donation}%&7..." to {_p}
926
927on chat:
928 if {liveChat::%uuid of player%} is set:
929 if message does not contain "cancel":
930 cancel event
931 set {_g} to {liveChat::%uuid of player%}
932 live(player, message, {_g})
933 delete {liveChat::%uuid of player%}
934 else:
935 cancel event
936 delete {liveChat::%uuid of player%}
937 send "{@pre} &7You have successfully canceled it."
938
939function liveChat(p: player, t: text):
940 set {_u} to uuid of {_p}
941 if {tuber::subs::%{_u}%} >= 5000:
942 set {_u} to uuid of {_p}
943 set {liveChat::%{_u}%} to {_t}
944 send "{@pre} &7Please type a name for your livestream. Type &ccancel&7 if you want to cancel." to {_p}
945 else:
946 send "&7Sorry but you need &c&n5000 subs&7 to livestream." to {_p}
947
948function chooseGameL(p: player):
949 set {_u} to uuid of {_p}
950 add "Wackman" to {games::%{_u}%::*} if {games::%{_u}%::*} is not set
951 open virtual chest inventory with size 5 named "&c&nYour&7 Game List." to {_p}
952 format gui slot 4 of {_p} with green glass pane named "&fOthers &7&o(Vlogs, Random Stuff)" to close then run function liveChat({_p}, "Others")
953 if {games::%{_u}%::*} contains "Wackman":
954 format gui slot 10 of {_p} with paper named "&fPlay &c&nWackMan" to close then run function liveChat({_p}, "Wackman")
955 else:
956 format gui slot 10 of {_p} with red glass pane named "&cBuy Wackman" with lore "{@cost}250" to close then run function buyGame({_p}, "Wackman", 250)
957
958 if {games::%{_u}%::*} contains "Super Bob":
959 format gui slot 11 of {_p} with paper named "&fPlay &c&nSuper Bob" to close then run function liveChat({_p}, "Super Bob")
960 else:
961 format gui slot 11 of {_p} with red glass pane named "&cBuy Super Bob" with lore "{@cost}500" to close then run function buyGame({_p}, "Super Bob", 500)
962
963 if {games::%{_u}%::*} contains "Bloxers":
964 format gui slot 12 of {_p} with paper named "&fPlay &c&nBloxers" to close then run function liveChat({_p}, "Bloxers")
965 else:
966 format gui slot 12 of {_p} with red glass pane named "&cBuy Bloxers" with lore "{@cost}500" to close then run function buyGame({_p}, "Bloxers", 500)
967
968 if {games::%{_u}%::*} contains "Rota":
969 format gui slot 13 of {_p} with paper named "&fPlay &c&nRota" to close then run function liveChat({_p}, "Rota")
970 else:
971 format gui slot 13 of {_p} with red glass pane named "&cBuy Rota" with lore "{@cost}750" to close then run function buyGame({_p}, "Rota", 750)
972
973 if {games::%{_u}%::*} contains "7 nights at Lesly's":
974 format gui slot 14 of {_p} with paper named "&fPlay &c&n7 nights at Lesly's" to close then run function liveChat({_p}, "7 nights at Lesly's")
975 else:
976 format gui slot 14 of {_p} with red glass pane named "&cBuy 7 nights at Lesly's" with lore "{@cost}1000" to close then run function buyGame({_p}, "7 nights at Lesly's", 1000)
977
978 if {games::%{_u}%::*} contains "Larry's Mod":
979 format gui slot 15 of {_p} with paper named "&fPlay &c&nLarry's Mod" to close then run function liveChat({_p}, "Larry's Mod")
980 else:
981 format gui slot 15 of {_p} with red glass pane named "&cBuy Larry's Mod" with lore "{@cost}1500" to close then run function buyGame({_p}, "Larry's Mod", 1500)
982
983 if {games::%{_u}%::*} contains "Cave Game":
984 format gui slot 16 of {_p} with paper named "&fPlay &c&nCave Game" to close then run function liveChat({_p}, "Cave Game")
985 else:
986 format gui slot 16 of {_p} with red glass pane named "&cBuy Cave Game" with lore "{@cost}3000" to close then run function buyGame({_p}, "Cave Game", 3000)
987
988 if {games::%{_u}%::*} contains "Shooter Go":
989 format gui slot 19 of {_p} with paper named "&fPlay &c&nShooter Go" to close then run function liveChat({_p}, "Shooter Go")
990 else:
991 format gui slot 19 of {_p} with red glass pane named "&cBuy Shooter Go" with lore "{@cost}4000" to close then run function buyGame({_p}, "Shooter Go", 4000)
992
993 if {games::%{_u}%::*} contains "Shooter Royale":
994 format gui slot 20 of {_p} with paper named "&fPlay &c&nShooter Royale" to close then run function liveChat({_p}, "Shooter Royale")
995 else:
996 format gui slot 20 of {_p} with red glass pane named "&cBuy Shooter Royale" with lore "{@cost}5000" to close then run function buyGame({_p}, "Shooter Royale", 5000)
997
998 if {games::%{_u}%::*} contains "Theft Wars":
999 format gui slot 21 of {_p} with paper named "&fPlay &c&nTheft Wars" to close then run function liveChat({_p}, "Theft Wars")
1000 else:
1001 format gui slot 21 of {_p} with red glass pane named "&cBuy Theft Wars" with lore "{@cost}7500" to close then run function buyGame({_p}, "Theft Wars", 7500)
1002
1003 if {games::%{_u}%::*} contains "Trashnite":
1004 format gui slot 22 of {_p} with paper named "&fPlay &c&nTrashnite" to close then run function liveChat({_p}, "Trashnite")
1005 else:
1006 format gui slot 22 of {_p} with red glass pane named "&cBuy Trashnite" with lore "{@cost}10,000" to close then run function buyGame({_p}, "Trashnite", 10000)
1007
1008 if {games::%{_u}%::*} contains "Immortal Fight":
1009 format gui slot 23 of {_p} with paper named "&fPlay &c&nImmortal Fight" to close then run function liveChat({_p}, "Immortal Fight")
1010 else:
1011 format gui slot 23 of {_p} with red glass pane named "&cBuy Immortal Fight" with lore "{@cost}12,500" to close then run function buyGame({_p}, "Immortal Fight", 12500)
1012
1013 if {games::%{_u}%::*} contains "Ninja's Creed":
1014 format gui slot 24 of {_p} with paper named "&fPlay &c&nNinja's Creed" to close then run function liveChat({_p}, "Ninja's Creed")
1015 else:
1016 format gui slot 24 of {_p} with red glass pane named "&cBuy Ninja's Creed" with lore "{@cost}14,000" to close then run function buyGame({_p}, "Ninja's Creed", 14000)
1017
1018 if {games::%{_u}%::*} contains "Beague Of Legends":
1019 format gui slot 25 of {_p} with paper named "&fPlay &c&nBeague Of Legends" to close then run function liveChat({_p}, "Beague Of Legends")
1020 else:
1021 format gui slot 25 of {_p} with red glass pane named "&cBuy Beague Of Legends" with lore "{@cost}16,000" to close then run function buyGame({_p}, "Beague Of Legends", 16000)
1022
1023 if {games::%{_u}%::*} contains "Happy Cars":
1024 format gui slot 30 of {_p} with paper named "&fPlay &c&nHappy Cars" to close then run function liveChat({_p}, "Happy Cars")
1025 else:
1026 format gui slot 30 of {_p} with red glass pane named "&cBuy Happy Cars" with lore "{@cost}18,000" to close then run function buyGame({_p}, "Happy Cars", 18000)
1027
1028 if {games::%{_u}%::*} contains "Overlook":
1029 format gui slot 31 of {_p} with paper named "&fPlay &c&nOverlook" to close then run function liveChat({_p}, "Overlook")
1030 else:
1031 format gui slot 31 of {_p} with red glass pane named "&cBuy Overlook" with lore "{@cost}20,000" to close then run function buyGame({_p}, "Overlook", 20000)
1032
1033 if {games::%{_u}%::*} contains "PBA 2K19":
1034 format gui slot 32 of {_p} with paper named "&fPlay &c&nPBA 2K19" to close then run function liveChat({_p}, "PBA 2K19")
1035 else:
1036 format gui slot 32 of {_p} with red glass pane named "&cBuy PBA 2K19" with lore "{@cost}25,000" to close then run function buyGame({_p}, "PBA 2K19", 25000)
1037
1038# Other MISC stuff....
1039
1040function sAlgo():
1041 loop {players::*}:
1042 set {_p} to loop-value
1043 set {_u} to uuid of {_p}
1044 if {tuber::set::%{_u}%} is set:
1045 if {tuber::videos::%{_u}%::*} is set:
1046 if {tuber::subs::%{_u}%} > 0:
1047 if {tuber::subs::%{_u}%} < 10000:
1048 set {_size} to size of {tuber::videos::%{_u}%::*}
1049 if {_size} > 0:
1050 set {_chance} to {tuber::subs::%{_u}%}/13
1051 chance of {_chance}%:
1052 set {_l} to {tuber::views::%{_u}%}/18
1053 set {_n} to {_l}/7
1054 set {_n} to rounded {_n}
1055 add {_n} to {_size}
1056 wait 1 tick
1057 add {_size} to {tuber::subs::%{_u}%}
1058 send "&c[Subscriber] &7You gained &c%{_size}% &7sub/s" to {_p} if {tuber::alert::%{_u}%} is set
1059 stop
1060 else:
1061 set {_chance} to 50
1062 chance of {_chance}%:
1063 set {_n} to random integer between 1 and 3
1064 add {_n} to {tuber::subs::%{_u}%}
1065 send "&c[Subscriber] &7You gained &c%{_n}%&7 sub/s randomly." to {_p} if {tuber::alert::%{_u}%} is set
1066 stop
1067 else:
1068 if {tuber::subs::%{_u}%} < 1000000:
1069 set {_size} to size of {tuber::videos::%{_u}%::*}
1070 set {_size} to {_size}/6
1071 set {_size} to rounded {_size}
1072 chance of {_size}%:
1073 set {_n} to {tuber::views::%{_u}%}/6
1074 set {_subs} to rounded {_n}
1075 set {_l} to random integer between 1 and {_subs}
1076 add {_l} to {tuber::subs::%{_u}%}
1077 send "&c[Subscriber] &7You gained &c%{_l}%&7 sub/s." to {_p} if {tuber::alert::%{_u}%} is set
1078 else:
1079 if {tuber::subs::%{_u}%} < 10000000:
1080 set {_size} to size of {tuber::videos::%{_u}%::*}
1081 set {_size} to {_size}/9
1082 set {_size} to rounded {_size}
1083 chance of {_size}%:
1084 set {_n} to {tuber::views::%{_u}%}/9
1085 set {_subs} to rounded {_n}
1086 set {_l} to random integer between 1 and {_subs}
1087 add {_l} to {tuber::subs::%{_u}%}
1088 send "&c[Subscriber] &7You gained &c%{_l}%&7 sub/s." to {_p} if {tuber::alert::%{_u}%} is set
1089 else:
1090 set {_size} to size of {tuber::videos::%{_u}%::*}
1091 set {_size} to {_size}/10
1092 set {_size} to rounded {_size}
1093 chance of {_size}%:
1094 set {_n} to {tuber::views::%{_u}%}/10
1095 set {_subs} to rounded {_n}
1096 set {_l} to random integer between 1 and {_subs}
1097 add {_l} to {tuber::subs::%{_u}%}
1098 send "&c[Subscriber] &7You gained &c%{_l}%&7 sub/s." to {_p} if {tuber::alert::%{_u}%} is set
1099
1100 else:
1101 set {_chance} to 25
1102 chance of {_chance}%:
1103 set {_n} to random integer between 1 and 2
1104 add {_n} to {tuber::subs::%{_u}%}
1105 send "&c[Subscriber] &7You gained &c%{_n}%&7 sub/s randomly." to {_p} if {tuber::alert::%{_u}%} is set
1106 stop
1107 else:
1108 set {_chance} to 10
1109 chance of {_chance}%:
1110 set {_n} to random integer between 1 and 2
1111 add {_n} to {tuber::subs::%{_u}%}
1112 send "&c[Subscriber] &7You gained &c%{_n}%&7 sub/s randomly." to {_p} if {tuber::alert::%{_u}%} is set
1113 stop
1114
1115every 3 minutes:
1116 loop all players:
1117 set {_p} to loop-player
1118 set {_u} to uuid of {_p}
1119 if {tuber::set::%{_u}%} is set:
1120 if {tuber::views::%{_u}%} > 5000:
1121 set {_chance} to 40
1122 chance of {_chance}%:
1123 set {_n} to {tuber::views::%{_u}%}/5000
1124 add {_n} to {balance::%{_u}%}
1125 send "{@pre} &7You earned &a$%{_n}%&7 from your &c%{tuber::views::%{_u}%}%&7 total views..." to {_p}
1126
1127function vAlgo():
1128 loop all players:
1129 set {_p} to loop-player
1130 set {_u} to uuid of {_p}
1131 if {tuber::set::%{_u}%} is set:
1132 if {tuber::videos::%{_u}%::*} is set:
1133 loop {tuber::videos::%{_u}%::*}:
1134 set {_video} to loop-value-1
1135 set {_subs} to {tuber::subs::%{_u}%}
1136 if {tuber::subs::%{_u}%} > 0:
1137 if {tuber::subs::%{_u}%} < 1000:
1138 if {tuber::subs::%{_u}%} < 100000:
1139 if {tuber::subs::%{_u}%} < 1000000:
1140 if {tuber::subs::%{_u}%} < 10000000:
1141 set {_chance} to {_subs}/3
1142 chance of {_chance}%:
1143 set {_n} to random integer between 1 and 800
1144 add {_n} to {tuber::vidViews::%{_u}%::%{_video}%}
1145 add {_n} to {tuber::views::%{_u}%}
1146 send action bar "&c[Views] &7You gained &c%{_n}%&7 views from &7%{_video}%" to {_p} if {tuber::alert::%{_u}%} is set
1147 else:
1148 if {tuber::subs::%{_u}%} < 100000:
1149 if {tuber::subs::%{_u}%} < 1000000:
1150 if {tuber::subs::%{_u}%} < 10000000:
1151 set {_chance} to {_subs}/5000
1152 set {_chance} to {_subs} * 100 if {_chance} < 0.01
1153 chance of {_chance}%:
1154 set {_s} to rounded ({_subs}/2)
1155 set {_n} to random integer between 1000 and {_s}
1156 add {_n} to {tuber::vidViews::%{_u}%::%{_video}%}
1157 add {_n} to {tuber::views::%{_u}%}
1158 send action bar "&c[Views] &7You gained &c%{_n}%&7 views from &7%{_video}%" to {_p} if {tuber::alert::%{_u}%} is set
1159 else:
1160 if {tuber::subs::%{_u}%} < 1000000:
1161 if {tuber::subs::%{_u}%} < 10000000:
1162 set {_chance} to {_subs}/40000
1163 chance of {_chance}%:
1164 set {_s} to rounded ({_subs}/2)
1165 set {_n} to random integer between 100000 and {_s}
1166 add {_n} to {tuber::vidViews::%{_u}%::%{_video}%}
1167 add {_n} to {tuber::views::%{_u}%}
1168 send action bar "&c[Views] &7You gained &c%{_n}%&7 views from &7%{_video}%" to {_p} if {tuber::alert::%{_u}%} is set
1169 else:
1170 if {tuber::subs::%{_u}%} < 10000000:
1171 set {_chance} to rounded ({_subs}/200000)
1172 chance of {_chance}%:
1173 set {_s} to rounded ({_subs}/4)
1174 set {_n} to random integer between 1000000 and {_s}
1175 add {_n} to {tuber::vidViews::%{_u}%::%{_video}%}
1176 add {_n} to {tuber::views::%{_u}%}
1177 send action bar "&c[Views] &7You gained &c%{_n}%&7 views from &7%{_video}%" to {_p} if {tuber::alert::%{_u}%} is set
1178 else:
1179 set {_chance} to rounded ({_subs}/5000000)
1180 chance of {_chance}%:
1181 set {_s} to rounded ({_subs}/5)
1182 set {_n} to random integer between 1000000 and {_s}
1183 add {_n} to {tuber::vidViews::%{_u}%::%{_video}%}
1184 add {_n} to {tuber::views::%{_u}%}
1185 send action bar "&c[Views] &7You gained &c%{_n}%&7 views from &7%{_video}%" to {_p} if {tuber::alert::%{_u}%} is set
1186 else:
1187 set {_chance} to 40
1188 chance of {_chance}%:
1189 add 3 to {tuber::vidViews::%{_u}%::%{_videos}%}
1190 add {_n} to {tuber::views::%{_u}%}
1191 send action bar "&c[Views] &7You gained &c%{_n}%&7 views from &7%{_video}%" to {_p} if {tuber::alert::%{_u}%} is set
1192
1193every 6 minutes:
1194 sAlgo()
1195 vAlgo()
1196
1197every 8 minutes:
1198 income()
1199
1200on join:
1201 if {balance::%uuid of player%} is not set:
1202 set {balance::%uuid of player%} to 250
1203
1204function short(n: num) :: string:
1205 set {_units::*} to "K", "M", "B", "T", "q", "Q", "s", "S" and "O"
1206 loop size of {_units::*} times:
1207 {_n} >= 1000 ^ loop-num:
1208 {_n} < 1000 ^ (loop-num + 1)
1209 return "%{_n} / 1000 ^ loop-num%%{_units::%loop-num%}%"
1210 return "%{_n}%"
1211
1212command /setviews [<offline player>] [<number>]:
1213 permission: admin
1214 trigger:
1215 if arg-1 is set:
1216 set {_p} to arg-1 ? player
1217 set {_u} to uuid of {_p}
1218 if arg-2 is set:
1219 set {tuber::views::%{_u}%} to arg-2
1220 send "&c[Server] &7Successfully set &c&n%{_p}%&7's views to &c&n%arg-2%&7."
1221 else:
1222 send "&c[Server] &7Please provide a number"
1223 else:
1224 send "&c[Server] &7Please provide a player"
1225
1226command /setsubs [<offline player>] [<number>]:
1227 permission: admin
1228 trigger:
1229 if arg-1 is set:
1230 set {_p} to arg-1 ? player
1231 set {_u} to uuid of {_p}
1232 if arg-2 is set:
1233 set {tuber::subs::%{_u}%} to arg-2
1234 send "&c[Server] &7Successfully set &c&n%{_p}%&7's subs to &c&n%arg-2%&7."
1235 else:
1236 send "&c[Server] &7Please provide a number"
1237 else:
1238 send "&c[Server] &7Please provide a player"
1239
1240
1241# Basics by Farwl
1242
1243# # #
1244
1245Options:
1246 ver: 0.0.1
1247 np: &cYou're not allowed to use this command!
1248
1249# CONFIG
1250
1251 welcomeNewPlayers: true
1252 # Checks whether not to broadcast a welcome message for new players
1253
1254 playerJoinBroadcast: true
1255 # Checks whether not to broadcast a message when a player joins
1256
1257 playerQuitBroadcast: true
1258 # Checks whether not to broadcast a message when a player leaves
1259
1260 feedWhenHeal: false
1261 # Checks whether not to heal AND feed the player when using the /heal command
1262
1263 hunger: true
1264 # Enable or disable hunger across your server
1265
1266 accountsPerIP: 0
1267 # The number of accounts allowed to be connected to your server from the same IP at one time
1268 # Must be set to an integer, set to 0 to disable
1269
1270 spawnDelay: 5
1271 # The delay, in seconds, before a player is teleported to spawn
1272 # Must be set to an integer, set to 0 to disable
1273
1274 commandBlocker: true
1275 # Enable or disable the built-in command blocker feature
1276
1277# CONFIG
1278
1279# CODE #
1280
1281# Functions
1282
1283
1284
1285function gmU(p: player):
1286 send "&3Gamemode updated." to {_p}
1287
1288function eop(p: player):
1289 send "&cCouldn't find that player, they're probably offline." to {_p}
1290
1291function enp(p: player):
1292 send "{@np}" to {_p}
1293
1294function pS(v: string, p: string, id: string):
1295 loop all players:
1296 {_id} = "p" or "pling":
1297 play sound "block.note.pling" with volume {_v} with pitch {_p} at loop-player for loop-player
1298 else if {_id} = "t" or "totem" or "punish":
1299 play sound "item.totem.use" with volume {_v} with pitch {_p} at loop-player for loop-player
1300 else if {_id} = "f" or "flap":
1301 play sound "entity.enderdragon.flap" with volume {_v} with pitch {_p} at loop-player for loop-player
1302
1303# Events
1304
1305#Hunger
1306food bar change:
1307 {@hunger} != true:
1308 cancel event
1309
1310#Connections
1311first join:
1312 add 1 to {joins::*}
1313 set join message to "&c%player% &7joined for the first time (&a##%size of {joins::*}%&7)"
1314
1315join:
1316 if player has played before:
1317 set join message to "&a[+] &7%player%"
1318
1319quit:
1320 {@playerQuitBroadcast} = true:
1321 set leave message to "&c[-] &7%player%"
1322
1323
1324
1325#BlockedCommands
1326command:
1327 command sender is player:
1328 player is not op
1329 command is "reload" or "rl" or "essentials:help" or "ver" or "version" or "?" or "ehelp" or "bukkit:?" or "bukkit:about" or "bukkit:help" or "bukkit:reload" or "bukkit:rl" or "bukkit:timings" or "bukkit:ver" or "bukkit:version" or "pl" or "plugins" or "plugin" or "bukkit:pl" or "bukkit:plugins" or "me" or "minecraft:me" or "essentials:me":
1330 cancel event
1331 enp(player)
1332
1333
1334command:
1335 {@commandBlocker} = true:
1336 loop {blockedcommands::*}:
1337 loop-value = "%command%":
1338 cancel event
1339 send "&cCommand blocked."
1340
1341# Commands
1342
1343
1344#ClearInv
1345command /clear [<player>]:
1346 permission: basics.clear
1347 permission message: {@np}
1348 trigger:
1349 arg-1 is set:
1350 arg-1 is online:
1351 player has permission "basics.clear.others":
1352 clear arg-1's inventory
1353 send "&3Inventory cleared." to arg-1
1354 else:
1355 enp(player)
1356 else:
1357 eop(player)
1358 else:
1359 clear player's inventory
1360 send "&3Inventory cleared." to player
1361
1362#CommandBlocker
1363command /commandblocker [<text>]:
1364 permission: admin
1365 permission message: {@np}
1366 trigger:
1367 set {_a::*} to (the args) split at " "
1368 {_a::1} is set:
1369 {_a::1} = "add":
1370 {_a::2} is set:
1371 {blockedcommands::*} contains "%{_a::2}%":
1372 send "&cThat command is already blocked, so you can't add it."
1373 else:
1374 {_a::2} = "commandblocker" or "cb" or "cb:commandblocker" or "cb:cb":
1375 send "&cThis command can only be disabled from the config."
1376 else:
1377 add "%{_a::2}%" to {blockedcommands::*}
1378 send "&aCommand '%{_a::2}%' is now blocked."
1379 else:
1380 send "&c/cb [add/remove/list] [command]"
1381 else if {_a::1} = "remove":
1382 {blockedcommands::*} contains "%{_a::2}%":
1383 remove "%{_a::2}%" from {blockedcommands::*}
1384 send "&aCommand '%{_a::2}%' is no longer blocked."
1385 else:
1386 send "&cThat command isn't blocked, so you can't remove it."
1387 else if {_a::1} = "list":
1388 size of {blockedcommands::*} > 0:
1389 send "&aRetrieving blocked commands..."
1390 set {_s} to size of {blockedcommands::*}
1391 set {_c::*} to {blockedcommands::*}
1392 send "&7Found &a&l%{_s}% &7blocked commands: &a%{_c::*}%"
1393 else:
1394 send "&cThere are no blocked commands, add some with /cb add"
1395 else:
1396 send "&c/cb [add/remove/list] [command]"
1397 else:
1398 send "&c/cb [add/remove/list] [command]"
1399
1400
1401#Feed
1402command /feed [<player>]:
1403 permission: feed
1404 permission message: {@np}
1405 trigger:
1406 arg-1 is set:
1407 arg-1 is online:
1408 set arg-1's food level to 10
1409 send "&3You have been saturated." to arg-1
1410 else:
1411 eop(player)
1412 else:
1413 set the player's food level to 10
1414 send "&3You have been saturated." to player
1415
1416#Flight
1417command /fly [<player>]:
1418 permission: mod
1419 permission message: {@np}
1420 trigger:
1421 arg-1 is set:
1422 player has permission "mod":
1423 arg-1 is online:
1424 arg-1 can fly:
1425 disable flight for player
1426 send "&3You can no longer fly." to player
1427 else:
1428 enable flight for arg-1
1429 send "&3You can now fly." to arg-1
1430 else:
1431 eop(player)
1432 else:
1433 enp(player)
1434 else:
1435 player can fly:
1436 disable flight for player
1437 send "&3You can no longer fly." to player
1438 else:
1439 enable flight for player
1440 send "&3You can now fly." to player
1441
1442#Gamemode
1443command /gamemode [<text>] [<player>]:
1444 permission: admin
1445 permission message: {@np}
1446 trigger:
1447 arg-1 and arg-2 are set:
1448 arg-2 is online:
1449 arg-1 = "creative" or "survival" or "adventure" or "spectator":
1450 set {_g} to arg-1 parsed as gamemode
1451 set arg-2's gamemode to {_g}
1452 gmU(player)
1453 else if arg-1 = "c" or "1":
1454 set arg-2's gamemode to creative
1455 gmU(player)
1456 else if arg-1 = "s" or "0":
1457 set arg-2's gamemode to survival
1458 gmU(player)
1459 else if arg-1 = "a" or "2":
1460 set arg-2's gamemode to adventure
1461 gmU(player)
1462 else if arg-1 = "s" or "sp" or "3":
1463 set arg-2's gamemode to spectator
1464 gmU(player)
1465 else:
1466 eop(player)
1467 else:
1468 send "&c/gamemode [gamemode] [player]"
1469
1470#GamemodeShortAliases
1471command /gmc [<player>]:
1472 permission: admin
1473 permission message: {@np}
1474 trigger:
1475 arg-1 is set:
1476 arg-1 is online:
1477 player has permission "admin":
1478 set arg-1's gamemode to creative
1479 gmU(player)
1480 else:
1481 enp(player)
1482 else:
1483 eop(player)
1484 else:
1485 set player's gamemode to creative
1486 gmU(player)
1487
1488command /gma [<player>]:
1489 permission: admin
1490 permission message: {@np}
1491 trigger:
1492 arg-1 is set:
1493 arg-1 is online:
1494 player has permission "admin":
1495 set arg-1's gamemode to adventure
1496 gmU(player)
1497 else:
1498 enp(player)
1499 else:
1500 eop(player)
1501 else:
1502 set player's gamemode to adventure
1503 gmU(player)
1504
1505
1506command /gms [<player>]:
1507 permission: mod
1508 permission message: {@np}
1509 trigger:
1510 arg-1 is set:
1511 arg-1 is online:
1512 player has permission "admin":
1513 set arg-1's gamemode to survival
1514 gmU(player)
1515 else:
1516 enp(player)
1517 else:
1518 eop(player)
1519 else:
1520 set player's gamemode to survival
1521 gmU(player)
1522
1523command /gmsp [<player>]:
1524 permission: mod
1525 permission message: {@np}
1526 trigger:
1527 arg-1 is set:
1528 arg-1 is online:
1529 player has permission "admin":
1530 set arg-1's gamemode to spectator
1531 gmU(player)
1532 else:
1533 enp(player)
1534 else:
1535 eop(player)
1536 else:
1537 set player's gamemode to spectator
1538 gmU(player)
1539
1540#Heal
1541command /heal [<player>]:
1542 permission: admin
1543 permission message: {@np}
1544 trigger:
1545 arg-1 is set:
1546 arg-1 is online:
1547 player has permission "admin":
1548 heal arg-1
1549 send "&3You have been healed." to arg-1
1550 {@feedWhenHeal} = true:
1551 set arg-1's food level to 10
1552 else:
1553 enp(player)
1554 else:
1555 eop(player)
1556 else:
1557 heal the player
1558 send "&3You have been healed." to player
1559 {@feedWhenHeal} = true:
1560 set the player's food level to 10
1561
1562#SetSpawn
1563command /setspawn:
1564 permission: admin
1565 permission message: {@np}
1566 trigger:
1567 set {spawn} to location of player
1568 send "&3Spawn set. &b(%location of player%)"
1569
1570#Spawn
1571command /spawn [<player>]:
1572 trigger:
1573 arg-1 is set:
1574 arg-1 is online:
1575 player has permission "admin":
1576 teleport arg-1 to {spawn}
1577 send "&3Teleporting..." to player
1578 else:
1579 enp(player)
1580 else:
1581 eop(player)
1582 else:
1583 {@spawnDelay} > 0:
1584 player has permission "staff":
1585 teleport player to {spawn}
1586 send "&3Teleporting..."
1587 else:
1588 send "&3Teleporting..."
1589 wait {@spawnDelay} seconds
1590 teleport player to {spawn}
1591 else:
1592 teleport player to {spawn}
1593
1594
1595
1596
1597function short(n: number) :: text:
1598 if {_n} >= 1000:
1599 if {_n} < 1000000:
1600 if {_n} < 1000000000:
1601 set {_number} to {_n}/1000
1602 return "%{_number}%K"
1603 if {_n} >= 1000000000:
1604 set {_number} to {_n}/1000000000
1605 return "%{_number}%B"
1606 if {_n} >= 1000000:
1607 if {_n} >= 1000000000:
1608 set {_number} to {_n}/1000000000
1609 return "%{_number}%B"
1610 else:
1611 set {_number} to {_n}/1000000
1612 return "%{_number}%M"
1613 if {_n} >= 1000000000000:
1614 set {_number} to {_n}/1000000000000
1615 return "%{_number}%T"
1616
1617command /skull [<offline player>]:
1618 permission: admin
1619 trigger:
1620 if arg-1 is set:
1621 add 1 of skull of arg-1 to player's inventory
1622 send "&c[Skull] &7Successfully added &c%arg-1%&7's skull to your inventory"
1623 else:
1624 send "&c[Skull] &7&o/skull <player> "
1625
1626on chat:
1627
1628 if {recent} is first 6 characters of message:
1629 player is not op
1630 cancel event
1631 send "&cPossible spam detected."
1632
1633 set {recent} to first 6 characters of message
1634
1635
1636
1637 if message contains "[item]":
1638 {chat} is not set
1639 player is not holding air
1640 cancel event
1641
1642 set {_name} to name of tool ? type of tool
1643 set {_lore} to lore of tool
1644 replace all "||" with nl in {_lore}
1645 if {_lore} is "":
1646 set {_lore} to "&7No Lore"
1647 set {_enchantments::*} to enchantments of tool
1648 loop {_enchantments::*}:
1649 add 1 to {_n}
1650 set {_e::%{_n}%} to "%loop-value% %level of loop-value on tool%%nl%"
1651 set {_e2} to "%{_e::*}%"
1652 replace all ", " and " and " with "" in {_e2}
1653 if "%{_e2}%" is "<none>":
1654 set {_e2} to "No Enchantments"
1655 set {_tooltip} to "&e(%amount of tool in player's inventory%x) &8| &7%{_name} ? type of tool%&r &8| &e(%type of tool%)%nl%&7%{_e2} ? ""No Enchantments""%%nl%&7%{_lore} ? ""No Lore""%"
1656 set {_weapon} to "<tooltip:%{_tooltip}%>&a&l[ &f%amount of tool in player's inventory%x %name of tool ? type of tool% &a&l]&r"
1657
1658 replace all "[item]" with "%{_weapon}%" in message
1659 send "&7%player's prefix%%player%%player's suffix%&8: &f%message%" to all players
1660
1661 set chat format to "&7%player's prefix%%player%%player's suffix%&8: &f%message%"
1662
1663
1664command /rename [<text>]:
1665 permission: rename
1666 permission message: "&cInsufficient Permissions"
1667 trigger:
1668 if arg-1 is set:
1669 if player's tool is not air:
1670 if player's tool is not enchanted book:
1671 if player's tool is not tripwire hook:
1672 set name of player's tool to "%colored arg-1%"
1673 send "&c[Rename] &7You have set the name of your tool to %colored arg-1%"
1674 else:
1675 send "&c[Rename] &7Sorry but you cannot rename that."
1676 else:
1677 send "&c[Rename] &7Sorry but you cannot rename that."
1678 else:
1679 send "&c[Rename] &7Sorry but you have to hold an item"
1680 else:
1681 send "&c[Rename] &7Please provide a name"
1682
1683
1684options:
1685 prefix: &3[Reports]
1686 staff: staff
1687 no-perm: &cNo permission.
1688 gui-name: &3Reports &lGUI
1689
1690command /report [<offline player>] [<text>]:
1691 trigger:
1692 if arg 1 is set:
1693 if arg 2 is set:
1694 add arg-1 to {reports::players::*}
1695 set {reports::reason::%arg-1%} to arg 2
1696 set {reports::reporter::%arg-1%} to player
1697 send "{@prefix} &7Sucessfully reported &e%arg-1% &7for &e%arg-2%&7."
1698 send "{@prefix} &7A new file has been made against &e%arg-1%&7. Check /reports." to all players where [input has permission "staff"]
1699 else:
1700 send "{@prefix} &7Please provide a reason."
1701 else:
1702 send "{@prefix} &7Please provide a player."
1703
1704command /reports [<text>]:
1705 permission: {@staff}
1706 permission message: {@no-perm}
1707 trigger:
1708 send "{@prefix} &7Opening the report gui..."
1709 wait 1 tick
1710 reports(player)
1711
1712function reports(p: player):
1713 open virtual chest inventory with size 6 named "{@gui-name}" to {_p}
1714 set {_n} to 0
1715 if {reports::players::*} is set:
1716 loop {reports::players::*}:
1717 format gui slot {_n} of {_p} with ("%loop-value%" parsed as offline player)'s skull with no nbt named "&3%loop-value%" with lore "&7Reason&8: &3%{reports::reason::%loop-value%}%" and "&7Reporter&8: &3%{reports::reporter::%loop-value%}%"
1718 add 1 to {_n}
1719 if {_n} = 53:
1720 stop loop
1721 else:
1722 format gui slot 0 of {_p} with paper with no nbt named "&7None." with lore "&7Currently no reports." to do nothing
1723
1724 format gui slot 53 of {_p} with empty map with no nbt named "&6Clear Reports" to run:
1725 close player's inventory
1726 loop {reports::players::*}:
1727 delete {reports::reason::%loop-value%}
1728 delete {reports::reporter::%loop-value%}
1729 wait 1 tick
1730 clear {reports::players::*}
1731 reports({_p})
1732
1733options:
1734 server: &3[Server]&7
1735 no-perm: &cYou lack of permission.
1736 usage: &3&lUSAGE &8|
1737
1738command /sc [<text>]:
1739 aliases:staffchat
1740 permission: staff
1741 permission message: "{@no-perm}"
1742 trigger:
1743 if arg-1 is set:
1744 send "&3&L(STAFF-CHAT) &f%player's display name% &8| &f%arg-1%" to all players where [input has permission "staff"]
1745 else:
1746 if {staff.chat::%player's uuid%} is not set:
1747 set {staff.chat::%player's uuid%} to true
1748 send "&3&L(STAFF-CHAT) &7Staff chat &aenabled&7."
1749 else:
1750 delete {staff.chat::%player's uuid%}
1751 send "&3&L(STAFF-CHAT) &7Staff chat &cdisabled&7."
1752
1753on chat:
1754 if {staff.chat::%player's uuid%} is set:
1755 cancel event
1756 send "&3&L(STAFF-CHAT) &f%player's display name% &8| &f%message%" to all players where [input has permission "staff"]
1757
1758on chat:
1759 set {_m} to uncolored message
1760 set {_mes::*} to {_m} split at ""
1761 if {_mes::1} is "##":
1762 cancel event
1763 replace all "##" with "" in message
1764 execute player command "/sc %message%"
1765
1766options:
1767 pre: &3[Anti-Bot]
1768
1769on join:
1770 teleport player to location(0, 105, 0, world("ul_flatworld"))
1771 execute console command "/spawn %player%"
1772 player is not op
1773 set {antibot::%player%} to random 3 char string from `a-zA-Z0-9`
1774 send "{@pre} <tooltip:&b%{antibot::%player%}%>&7Please hover over this message to confirm that you are not a bot."
1775
1776on join:
1777 teleport player to {spawn}
1778 teleport player to location(0, 105, 0, world("ul_flatworld"))
1779 execute console command "/spawn %player%"
1780
1781on chat:
1782 if {antibot::%player%} is set:
1783 if message does not contain "%{antibot::%player%}%":
1784 cancel event
1785 send "{@pre} <tooltip:&b%{antibot::%player%}%>&7Please hover over this message to confirm that you are not a bot."
1786 else:
1787 delete {antibot::%player%}
1788 send "{@pre} &7Successfully verified that you are not a bot."
1789 cancel event
1790
1791every second:
1792 loop all players where [input is in world "world"]:
1793 loop-player is not op
1794 execute console command "/spawn %loop-player%"
1795 teleport loop-player to {spawn}
1796 teleport loop-player to location(0, 105, 0, world("ul_flatworld"))
1797
1798
1799on command:
1800 set {_c} to full command
1801 if {_c} contains "msg" or "message" or "f":
1802 if {antibot::%player%} is set:
1803 cancel event
1804 send "{@pre} <tooltip:&b%{antibot::%player%}%>&7Please hover over this message to confirm that you are not a bot."
1805
1806# BOUNTY AND KILLS
1807
1808on join:
1809 set {balance::%uuid of player%} to 250 if {balance::%uuid of player%} is not set
1810 set {kills::%uuid of player%} to 0 if {kills::%uuid of player%} is not set
1811 set {deaths::%uuid of player%} to 0 if {deaths::%uuid of player%} is not set
1812 set {killstreak::%uuid of player%} to 0 if {killstreak::%uuid of player%} is not player
1813 set {killstreak::best::%uuid of player%} to 0 if {killstreak::best::%uuid of player%} is not set
1814
1815
1816on quit:
1817 if {ct::%player%} is set:
1818 send " &4| &c%player% &7just logged out in combat!" to all players
1819 set {_attacker} to {attacker::%player%}
1820 set {_u} to {_attacker}'s uuid
1821 add 1 to {kills::%{_u}%}
1822 add 1 to {deaths::%player's uuid%}
1823 delete {attacker::%player%}
1824
1825on command:
1826 {ct::%player%} is set
1827 set {_c} to command
1828 if {_c} is "hub" or "lobby" or "server":
1829 add 1 to {confirm::%player%}
1830 if {confirm::%player%} is 1:
1831 cancel event
1832 send "Type command again to confirm. (Punishable Offense)"
1833 else:
1834 delete {confirm::%player%}
1835 else if {_c} is "spawn":
1836 cancel event
1837 send "You can't use that command in combat!"
1838
1839on damage of player:
1840
1841 if event is not canceled:
1842
1843 "%damage cause%" is not "suffocation"
1844 attacker is a player
1845
1846 set {attacker::%victim%} to attacker
1847
1848 if {ct::%attacker%} is not set:
1849 send " &4| &7You have combat tagged &c%victim%&7." to attacker
1850
1851 if {ct::%victim%} is not set:
1852 send " &4| &7You've been combat tagged by &c%attacker%&7." to victim
1853
1854 set {ct::%attacker%} to 20
1855 set {ct::%victim%} to 20
1856
1857every second:
1858 loop all players where [{ct::%player input%} is set]:
1859 remove 1 from {ct::%loop-player%}
1860 if {ct::%loop-player%} is 0:
1861 delete {ct::%loop-player%}
1862 send " &a| &7You are free to log out!" to loop-player
1863
1864command /ct [<text>]:
1865 trigger:
1866 if {ct::%player%} is not set:
1867 send "&7You are not combat tagged."
1868 else:
1869 send " &4| &7You are combat tagged for &c%{ct::%player%}% &7seconds."
1870
1871on hunger bar change:
1872 loop 2 times:
1873 feed player
1874 cancel event
1875
1876command /bc [<text>]:
1877 permission: admin
1878 aliases:broadcast, announce
1879 trigger:
1880 if arg-1 is set:
1881 broadcast ""
1882 broadcast "&4&l[ALERT] &f%colored arg-1%"
1883 broadcast ""
1884 else:
1885 send "&c/bc <text>"
1886
1887# ANTI-ADVERTISEMENT System
1888
1889on chat:
1890 player is not op
1891 if message contains ".gg" or ".minehut.gg" or "./join":
1892 cancel event
1893 send "&3&L(ADVERTISE) &7Sorry, but you cannot advertise in here."
1894 send "&3&L(ADVERTISE) &e%player% &7tried to advertise &f( &7%message% &f)" to all players where [input has permission "staff"]
1895 if message contains "nigger" or "nigga" or "ngger" or "niger" or "n1ga" Or "n1gga":
1896 cancel event
1897 send "&3&L(WARNING) &&Please dont be &eRacist"
1898
1899# INFO System
1900
1901every 2 minutes:
1902 set {_l} to random integer between 1 and 6
1903 if {_l} = 1:
1904 broadcast "&8[&cInfo&8] &7See a rule breaker? Report them through /report!"
1905 if {_l} = 2:
1906 broadcast "&8[&cInfo&8] &7Join our discord server at https://discord.gg/mAadE8c"
1907 if {_l} = 3:
1908 broadcast "&8[&cInfo&8] &7Follow the rules... (/rules)"
1909 if {_l} = 4:
1910 broadcast "&8[&cInfo&8] &7Need to buy items? (/shop)"
1911
1912# RULES Command
1913
1914command /rules [<text>]:
1915 trigger:
1916 send "&c&lRULES"
1917 send ""
1918 send "&8##1. &7Use Common sense ffs."
1919 send "&8##2. &7Read Rule 1"
1920 send "&8##3. &7Hacking would result a permanent ban."
1921 send "&8##4. &7Spawn Camping is not allowed"
1922 send "&8##5. &7Using alts to boost youself is not allowed."
1923 send ""
1924
1925command /cc [<text>]:
1926 aliases:chatclear
1927 permission: mod
1928 trigger:
1929 if arg-1 is set:
1930 loop 100 times:
1931 send "" to all players
1932 broadcast "&4[Chat Clear] &7The chat has been cleared by &c%player% &7for &c%arg-1%&7."
1933 else:
1934 loop 100 times:
1935 send "" to all players
1936 broadcast "&4[Chat Clear] &7The chat has been cleared by &c%player% &7for &cN/A&7."
1937
1938command /cm [<text>]:
1939 aliases:chatmute
1940 permission: mod
1941 trigger:
1942 if arg-1 is set:
1943 if {chatmute} is not set:
1944 set {chatmute} to true
1945 broadcast "&4[Chat Mute] &7The chat has been muted by &c%player% &7for &c%arg-1%&7."
1946 else:
1947 delete {chatmute}
1948 broadcast "&4[Chat Mute] &7The chat has been unmuted by &c%player%"
1949 else:
1950 if {chatmute} is not set:
1951 set {chatmute} to true
1952 broadcast "&4[Chat Mute] &7The chat has been muted by &c%player% &7for &cN/A&7."
1953 else:
1954 delete {chatmute}
1955 broadcast "&4[Chat Mute] &7The chat has been unmuted by &c%player%"
1956
1957on chat:
1958 player is not op
1959 if {chatmute} is set:
1960 cancel event
1961 send "&4[Chat Mute] &7Chat is currently &c&nMuted"
1962
1963on join:
1964 remove invisibility from player
1965 while player is online:
1966 wait 5 seconds
1967 score(player)
1968
1969function score(p: player):
1970 set {_u} to uuid of {_p}
1971 wipe {_p}'s sidebar
1972 set name of sidebar of {_p} to "&cTuber&4&lS &b(%number of all players%/42)"
1973 set score "&c&l%{_p}%&8:" in sidebar of {_p} to 15
1974 set score " &7KD &8- &c%{kills::%{_u}%}%&8/&c%{deaths::%{_u}%}%" in sidebar of {_p} to 14
1975 set score " &7Balance &8- &c%{balance::%{_u}%}%" in sidebar of {_p} to 13
1976 set score " &7Rank &8- &c%{_p}'s prefix%" in sidebar of {_p} to 12
1977 set score " &7Kill Streak &8- &c%{killstreak::%{_u}%}% &7&o(%{killstreak::best::%{_u}%}%)" in sidebar of {_p} to 11
1978 set score "&1" in sidebar of {_p} to 10
1979 set score "&c&lSTATS&8:" in sidebar of {_p} to 9
1980 set score " &7Channel name &8- &c%{tuber::set::%{_u}%}%" in sidebar of {_p} to 8 if {tuber::set::%{_u}%} is set
1981 set score " &7Channel name &8- &cN/A" in sidebar of {_p} to 8 if {tuber::set::%{_u}%} is not set
1982 set score " &7Subscribers &8- &c%{tuber::subs::%{_u}%}%" in sidebar of {_p} to 7 if {tuber::set::%{_u}%} is set
1983 set score " &7Subscribers &8- &c0" in sidebar of {_p} to 7 if {tuber::set::%{_u}%} is not set
1984 set score "&2" in sidebar of {_p} to 6
1985 set score "&c&nTuber&4&nS&7.minehut.gg" in sidebar of {_p} to 5
1986
1987function score(p: player):
1988 set {_u} to uuid of {_p}
1989 if {tuber::set::%{_u}%} is set:
1990 wipe {_p}'s sidebar
1991 set name of sidebar of {_p} to "&cTuber&4&lS &b(%number of all players%/%max players%)"
1992 set score "&c&l%{_p}%&8:" in sidebar of {_p} to 15
1993 set score " &7Channel name &8- &c%{tuber::set::%{_u}%}%" in sidebar of {_p} to 14
1994 set score " &7Subscribers &8- &c%{tuber::subs::%{_u}%}%" in sidebar of {_p} to 13
1995 set score " &7Total Views &8- &c%{tuber::views::%{_u}%}%" in sidebar of {_p} to 12
1996 set score " &7Balance &8- &c%{balance::%{_u}%}%" in sidebar of {_p} to 11
1997 set score " &7Rank &8- &c%{_p}'s prefix%" in sidebar of {_p} to 10
1998 set score "&1" in sidebar of {_p} to 9
1999 set score "&c&nTuber&4&nS&7.minehut.gg" in sidebar of {_p} to 8
2000
2001command /advertise [<text>]:
2002 permission: famous
2003 trigger:
2004 if arg-1 is set:
2005 send "&7&oAbusing this command may cause to a temp ban."
2006 set {_waited} to now if {_waited} is not set
2007 set {_waited} to difference between {advert::cooldown::%uuid of player%} and now
2008 if ("%{_waited}%" parsed as timespan) < 15 seconds:
2009 send "&7You have to wait &c%difference between 15 seconds and {_waited}% &7to make another video." to {_p}
2010 stop
2011 broadcast ""
2012 broadcast "&c[Advertise] &f%arg-1%"
2013 broadcast ""
2014 set {_waited} to now
2015 else:
2016 send "&f/advertise <text>"
2017
2018on join:
2019 if {tuber::set::%uuid of player%} is set:
2020 set {_c} to {tuber::set::%uuid of player%}
2021 add {_c} to {tubers::*}
2022
2023command /discord [<text>]:
2024 trigger:
2025 send "%nl%&9[Discord] &7Join for updates and fun! <link:https://discord.gg/mAadE8c>https://discord.gg/mAadE8c%nl%"
2026
2027on join:
2028 player command "/gray" if player is not op
2029 player command "/white" if player is op
2030
2031command /masssay [<text>]:
2032 permission: admin
2033 trigger:
2034 if arg-1 is set:
2035 loop all players:
2036 loop-player is not player
2037 make loop-player say "%arg-1%"
2038 else:
2039 send "&c[MassSay] &7Provide a text please."
2040
2041command /code [<text>] [<text>]:
2042 aliases:referral
2043 trigger:
2044 set {_u} to uuid of player
2045 set {cooldown::%player%::used} to now if {cooldown::%player%::used} is not set
2046 if arg-1 is set:
2047 if arg-1 is "create":
2048 if {code::%{_u}%::*} is not set:
2049 set {_code} to random 6 char string from `a-zA-Z0-9`
2050 add {_code} to {code::%{_u}%::*}
2051 set {code::%{_code}%} to player
2052 add {_code} to {codes::*}
2053 send "%{code::%{_code}%}%"
2054 send "&c[Referral] &7Successfully created your own referral code which is &c&n%{_code}%"
2055 else:
2056 send "&c[Referral] &7You already have your own code... &c&n%{code::%{_u}%::*}%"
2057 else if arg-1 is "delete":
2058 if {code::%{_u}%::*} is set:
2059 set {_code} to "%{code::%{_u}%::*}%"
2060 delete {code::%{_u}%::*}
2061 delete {code::%{_code}%}
2062 remove {_code} from {codes::*}
2063 send "&c[Referral] &7Successfully deleted your code."
2064 else:
2065 send "&c[Referral] &7You do not have a code."
2066 else if arg-1 is "redeem":
2067 if arg-2 is set:
2068 if {codeused::%{_u}%} is not set:
2069 if {codes::*} contains arg-2:
2070 {code::%{_u}%::*} does not contain arg-2
2071 set {_used} to difference between {cooldown::%player%::used} and now
2072 if {_used} is less than 30 seconds:
2073 send "&7You need to wait &c&n%difference between 30 Seconds and {_used}%s&7 to be able to use referral codes!" to player
2074 stop
2075 else:
2076 set {codeused::%{_u}%} to true
2077 set {_code} to arg-2
2078 set {_owner} to ("%{code::%{_code}%}%" parsed as offline player)
2079 set {_owneruuid} to uuid of {_owner}
2080 add 300 to {balance::%{_owneruuid}%}
2081 add 100 to {balance::%uuid of player%}
2082 broadcast "%nl%&c[Referral] &c&n%player%&7 redeemed the referral code of &c%{_owner}%&7 and got &c&n100$&7...%nl%"
2083 else:
2084 send "&c[Referral] &7That code does not exist."
2085 else:
2086 send "&c[Referral] &7You've already redeemed a code."
2087 else:
2088 send "&c[Referral] &7Please provide a code."
2089
2090 else if arg-1 is "custom":
2091 if arg-2 is set:
2092 if player has permission "custom.code":
2093 if {code::%{_u}%::*} is not set:
2094 if {codes::*} does not contain arg-2:
2095 set {_code} to arg-2
2096 add {_code} to {code::%{_u}%::*}
2097 set {code::%{_code}%} to player
2098 add {_code} to {codes::*}
2099 send "%{code::%{_code}%}%"
2100 send "&c[Referral] &7Successfully created your own referral code which is &c&n%{_code}%"
2101 else:
2102 send "&c[Referral] &7This code already exists."
2103 else:
2104 send "&c[Referral] &7You already have your own code... &c&n%{code::%{_u}%::*}%"
2105 else:
2106 send "&c[Referral] &7You do not have access to custom codes."
2107
2108
2109 else if arg-1 is "info":
2110 send " &6&lREFERRALS"
2111 send ""
2112 send "&7Ever want to make money while inviting your friends? Well this is what this feature is for!"
2113 send "&7Make your own referral code by doing &c&n/referral create&7."
2114 send "&7How does it work? Once you invite someone, you can give them your code, They will get 100$, and you'll get 300$"
2115 send "&7Redeem a code by executing the command &c&n/referral redeem <code>"
2116 send "&7Your code is &c&n%{code::%{_u}%::*}%" if {code::%{_u}%::*} is set
2117 send "&7&oYou currently have no code." if {code::%{_u}%::*} is not set
2118 send ""
2119 else:
2120 player command "/code info"
2121
2122command /fixcode [<text>]:
2123 permission: admin
2124 trigger:
2125 loop all players:
2126 set {_u} to uuid of loop-player
2127 delete {codeused::%{_u}%}
2128
2129on first join:
2130 set {cooldown::%player%::used} to now
2131 teleport player to location(0, 105, 0, world("ul_flatworld"))
2132 execute console command "/spawn %player%"
2133
2134command /checkip [<offline player>]:
2135 permission: admin
2136 trigger:
2137 set {_player} to arg-1 ? player
2138 send "&c[CheckIP] &c%{_player}%&7's ip is &c&n%{_player}'s ip%&7."
2139
2140
2141command /links [<text>]:
2142 aliases:sites, discord
2143 trigger:
2144 send "&8&m&l+-----------------------------+"
2145 send ""
2146 send "&7Welcome to &cTuber&lS&7! &7&o(TuberS.minehut.gg)"
2147 send ""
2148 send "➳ &fDiscord: &b<link:https://discord.gg/mAadE8c>https://discord.gg/mAadE8c"
2149 send "➳ &fApplications: &b<link:https://swayl.typeform.com/to/lgKUxh>https://swayl.typeform.com/to/lgKUxh"
2150 send ""
2151 send "&8&m&l+-----------------------------+"
2152
2153on join:
2154 loop 100 times:
2155 send ""
2156 wait 1 second
2157 player is not op
2158 set {antibot::%player%} to random 5 char string from `a-zA-Z0-9`
2159 send "&c[Anti-Bot] &7Please type out &c%{antibot::%player%}% &7to confirm you're not a bot."
2160
2161on chat:
2162 if {antibot::%player%} is set:
2163 if message does not contain "%{antibot::%player%}%":
2164 send "&c[Anti-Bot] &7Please type out &c%{antibot::%player%}% &7to confirm you're not a bot."
2165 cancel event
2166 else:
2167 delete {antibot::%player%}
2168 send "&c[Anti-Bot] &7Thank you for the verification. Enjoy playing in Promise! /tut to learn the basics."
2169 cancel event
2170
2171on command:
2172 full command contains "msg"
2173 if {antibot::%player%} is set:
2174 send "&c[Anti-Bot] &7Please type out &c%{antibot::%player%}% &7to confirm you're not a bot."
2175 cancel event
2176
2177
2178command /settings [<text>]:
2179 trigger:
2180 settings(player)
2181
2182function settings(p: player):
2183 set {_u} to uuid of {_p}
2184 open virtual chest inventory with size 3 named "&c&LSETTINGS" to {_p}
2185 if {tuber::alert::%{_u}%} is set:
2186 format gui slot 13 of {_p} with green glass pane named "&7Notifications &a&lENABLED" with lore "&7Click to &c&LDISABLE" to run:
2187 delete {tuber::alert::%{_u}%}
2188 send "{@pre} &7Successfully disabled Notifications." to {_p}
2189 settings({_p})
2190 else:
2191 format gui slot 13 of {_p} with red glass pane named "&7Notifications &c&lDISABLED" with lore "&7Click to &a&lENABLE" to run:
2192 set {tuber::alert::%{_u}%} to true
2193 send "{@pre} &7Successfully enabled Notifications" to {_p}
2194 settings({_p})
2195 format gui slot 11 of {_p} with name tag named "&fSuffixes/Tags" to run function tags(player)
2196
2197command /bal [<offline player>]:
2198 trigger:
2199 set {_player} to arg-1 ? player
2200 set {_u} to uuid of {_player}
2201 send "&c[Server] &c%{_player}%&7 currently have &c$%{balance::%{_u}%}%&7."
2202
2203command /eco [<offline player>] [<text>] [<number>]:
2204 permission: admin
2205 trigger:
2206 if arg-1 is set:
2207 set {_p} to arg-1 ? player
2208 set {_u} to uuid of {_p}
2209 if arg-2 is "set":
2210 if arg-3 is set:
2211 set {balance::%{_u}%} to arg-3
2212 send "&c[Server] &7Successfully set &c%{_p}%&7's balance to &c%arg-3%$&7. &7&o(Current Balance - &c&o%{balance::%{_u}%}%&7&o)"
2213 else if arg-2 is "add":
2214 if arg-3 is set:
2215 add argument-3 to {balance::%{_u}%}
2216 send "&c[Server] &7Successfully added &c%arg-3%$ &7to balance of &c%arg-1%&7. &7&o(Current Balance - &c&o%{balance::%{_u}%}%&7&o)"
2217 else if arg-2 is "remove" or "take":
2218 if arg-3 is set:
2219 remove argument-3 from {balance::%{_u}%}
2220 send "&c[Server] &7Successfully removed &c%arg-3%$ &7from the balance of &c%arg-1%&7. &7&o(Current Balance - &c&o%{balance::%{_u}%}%&7&o) "
2221 else:
2222 send "&c[Server] &7/eco <player> <set/add/remove/take> <number>"
2223 else:
2224 send "&c[Server] &7/eco <player> <set/add/remove/take> <number>"
2225
2226on right click:
2227 if nbt of clicked block contains "Metroidling":
2228 execute player command "/tuber" with permission "tuber.use"
2229
2230# SHOP Skript
2231
2232options:
2233 cost: &3[Cost]&7
2234
2235command /shop:
2236 trigger:
2237 shop(player)
2238
2239function shop(p: player):
2240 set {_u} to uuid of {_p}
2241 open virtual chest inventory with size 3 named "&3&lSHOP &3&o($%{balance::%{_u}%}%)" to {_p}
2242 format gui slot 11 of {_p} with stone named "&3&lBLOCKS &7Category" to run function blocks({_p})
2243 format gui slot 13 of {_p} with diamond sword named "&3&lCOMBAT &7Category" to run function combat({_P})
2244 format gui slot 15 of {_p} with saddle named "&3&LMISC &7Category" to run function misc({_p})
2245
2246function blocks(p: player):
2247 set {_u} to uuid of {_p}
2248 open virtual chest inventory with size 3 named "&3&lBLOCKS &3&o($%{balance::%{_u}%}%)" to {_p}
2249 format gui slot 10 of {_p} with 16 cobblestone named "" with lore "{@cost} $500" to run:
2250 buy({_p}, cobblestone, 500, 16)
2251 blocks({_p})
2252 format gui slot 11 of {_p} with 4 obsidian named "" with lore "{@cost} $1000" to run:
2253 buy({_p}, obsidian, 1000, 4)
2254 blocks({_p})
2255 format gui slot 12 of {_p} with 8 oak log named "" with lore "{@cost} $150" to run:
2256 buy({_p}, oak log, 150, 8)
2257 blocks({_p})
2258 format gui slot 13 of {_p} with 12 sea lantern named "" with lore "{@cost} $400" to run:
2259 buy({_p}, sea lantern, 400, 12)
2260 blocks({_p})
2261 format gui slot 14 of {_p} with 16 sand named "" with lore "{@cost} $750" to run:
2262 buy({_p}, sand, 750, 16)
2263 blocks({_p})
2264 format gui slot 15 of {_p} with 16 dirt named "" with lore "{@cost} $100" to run:
2265 buy({_p}, dirt, 100, 16)
2266 blocks({_p})
2267 format gui slot 16 of {_p} with 16 prismarine named "" with lore "{@cost} $200" to run:
2268 buy({_p}, prismarine, 200, 16)
2269 blocks({_p})
2270 format gui slot 18 of {_p} with arrow named "&3&lGO BACK" to run:
2271 shop(player)
2272
2273function misc(p: player):
2274 set {_u} to uuid of {_p}
2275 open virtual chest inventory with size 4 named "&3&LMISC &3&o($%{balance::%{_u}%}%)" to {_p}
2276 format gui slot 10 of {_p} with bucket named "" with lore "{@cost} $250" to run:
2277 buy({_p}, bucket, 250, 1)
2278 misc({_p})
2279 format gui slot 11 of {_p} with water bucket named "" with lore "{@cost} $400" to run:
2280 buy({_p}, water bucket, 400, 1)
2281 misc({_p})
2282 format gui slot 12 of {_p} with 16 experience bottle named "" with lore "{@cost} $750" to run:
2283 buy({_p}, experience bottle, 750, 16)
2284 misc({_p})
2285 format gui slot 13 of {_p} with 1 enchantment table named "" with lore "{@cost} $2500" to run:
2286 buy({_p}, enchantment table, 2500, 1)
2287 misc({_p})
2288 format gui slot 14 of {_p} with 8 lapis named "" with lore "{@cost} $300" to run:
2289 buy({_p}, lapis, 300, 8)
2290 misc({_p})
2291 format gui slot 15 of {_p} with ender chest named "" with lore "{@cost} $900" to run:
2292 buy({_p}, ender chest, 900, 1)
2293 misc({_p})
2294 format gui slot 16 of {_p} with anvil named "" with lore "{@cost} $750" to run:
2295 buy({_p}, anvil, 750, 1)
2296 misc({_p})
2297 format gui slot 19 of {_p} with 1 golden apple named "" with lore "{@cost} $5000" to run:
2298 buy({_p}, golden apple, 5000, 1)
2299 misc({_p})
2300 format gui slot 20 of {_p} with 3 blaze rod named "" with lore "{@cost} $300" to run:
2301 buy({_p}, blaze rod, 300, 3)
2302 misc({_p})
2303 format gui slot 21 of {_p} with 3 glowstone dust named "" with lore "{@cost} $300" to run:
2304 buy({_p}, glowstone dust, 300, 3)
2305 misc({_p})
2306 format gui slot 22 of {_p} with 3 gunpowder named "" with lore "{@cost} $300" to run:
2307 buy({_p}, gunpowder, 300, 3)
2308 misc({_p})
2309 format gui slot 23 of {_p} with 1 glistering melon named "" with lore "{@cost} $300" to run:
2310 buy({_p}, glistering melon, 300, 1)
2311 misc({_p})
2312 format gui slot 24 of {_p} with 1 nether wart plant named "" with lore "{@cost} $300" to run:
2313 buy({_p}, nether wart plant, 300, 1)
2314 misc({_p})
2315 format gui slot 25 of {_p} with 3 golden carrot named "" with lore "{@cost} $500" to run:
2316 buy({_p}, golden carrot, 500, 3)
2317 misc({_p})
2318 format gui slot 30 of {_p} with bookshelf named "" with lore "{@cost} $1000" to run:
2319 buy({_p}, bookshelf, 1000, 1)
2320 misc({_p})
2321 format gui slot 31 of {_p} with book named "" with lore "{@cost} $900" to run:
2322 buy({_p}, book, 900, 1)
2323 misc({_p})
2324 format gui slot 32 of {_p} with string named "" with lore "{@cost} $750" to run:
2325 buy({_p}, string, 750, 1)
2326 misc({_p})
2327 format gui slot 27 of {_p} with arrow named "&3&lGO BACK" to run:
2328 shop({_p})
2329
2330
2331
2332function combat(p: player):
2333 set {_u} to uuid of {_p}
2334 open virtual chest inventory with size 4 named "&3&lCOMBAT &3&o($%{balance::%{_u}%}%)" to {_p}
2335 format gui slot 10 of {_p} with chainmail helmet named "&3&lCHAINMAIL &7Set" with lore "{@cost} $2500" to run:
2336 buy({_p}, chainmail helmet, 2500, 1)
2337 combat({_p})
2338 format gui slot 11 of {_p} with golden helmet named "&3&lGOLDEN &7Set" with lore "{@cost} $5000" to run:
2339 buy({_p}, golden helmet, 2500, 1)
2340 combat({_p})
2341 format gui slot 12 of {_p} with iron helmet named "&3&lIRON &7Set" with lore "{@cost} $10000" to run:
2342 buy({_p}, iron helmet, 2500, 1)
2343 combat({_p})
2344 format gui slot 14 of {_p} with stone sword named "" with lore "{@cost} $750" to run:
2345 buy({_p}, stone sword, 750, 1)
2346 combat({_p})
2347 format gui slot 13 of {_p} with golden sword named "" with lore "{@cost} $250" to run:
2348 buy({_p}, gold sword, 250, 1)
2349 combat({_p})
2350 format gui slot 15 of {_p} with iron sword named "" with lore "{@cost} $2500" to run:
2351 buy({_P}, iron sword, 2500, 1)
2352 combat({_p})
2353 format gui slot 16 of {_p} with diamond sword named "" with lore "{@cost} $5000" to run:
2354 buy({_p}, diamond sword, 5000, 1)
2355 combat({_p})
2356 format gui slot 19 of {_p} with bow named "" with lore "{@cost} $800" to run:
2357 buy({_p}, bow, 800, 1)
2358 combat({_p})
2359 format gui slot 20 of {_p} with 8 arrows named "" with lore "{@cost} $500" to run:
2360 buy({_p}, arrow, 500, 8)
2361 combat({_p})
2362 format gui slot 21 of {_p} with iron pickaxe named "" with lore "{@cost} $750" to run:
2363 buy({_p}, iron pickaxe, 750, 1)
2364 combat({_p})
2365 format gui slot 22 of {_p} with iron axe named "" with lore "{@cost} $750" to run:
2366 buy({_p}, iron axe, 750, 1)
2367 combat({_p})
2368 format gui slot 23 of {_p} with diamond pickaxe named "" with lore "{@cost} $1000" to run:
2369 buy({_p}, diamond pickaxe, 100, 1)
2370 combat({_p})
2371 format gui slot 24 of {_p} with diamond axe named "" with lore "{@cost} $1000" to run:
2372 buy({_p}, diamond axe, 1000, 1)
2373 combat({_p})
2374 format gui slot 27 of {_p} with arrow named "&3&lGO BACK" to run:
2375 shop({_p})
2376
2377
2378
2379function buy(p: player, i: item, c: number, n: number):
2380 set {_u} to uuid of {_p}
2381 if {balance::%{_u}%} >= {_c}:
2382 if {_i} is diamond helmet or golden helmet or iron helmet or chainmail helmet:
2383 give {_p} all diamond armor if {_i} is diamond helmet
2384 give {_p} all golden armor if {_i} is golden helmet
2385 give {_p} all iron armor if {_i} is iron helmet
2386 give {_p} all chainmail armor if {_i} is chainmail helmet
2387 else:
2388 add {_n} of {_i} to {_p}'s inventory
2389 send "&8[&3Shop&8] &7Successfully bought &3%{_i}% &7(%{_n}%x)" to {_p}
2390 remove {_c} from {balance::%{_u}%}
2391 else:
2392 set {_needed} to {_c} - {balance::%{_u}%}
2393 send "&8[&3Shop&8] &7Error! You need &3%{_needed}%$ &7to buy %{_i}%" to {_p}
2394
2395command /ban [<offline player>] [<text>]:
2396 permission: rank.jrmod
2397 permission message: &cYou don't have access to that command.
2398 trigger:
2399 if arg 2 is not set:
2400 send "&c/ban <player> <reason>"
2401 else:
2402 send "%nl% &c%player% &7banned &c%arg 1% &7for &c%arg 2%&7.%nl% " to all players
2403 set {_r} to "%nl% &cYou've been banned!%nl%%nl% &cPunished by: &7%player%%nl% &cReason: &7%arg 2%%nl% "
2404 add "(%now%) &c%player% &7banned &c%arg 1% &c[%arg 2%]" to {punishments::%arg 1's uuid%::*}
2405 create embed:
2406 set the title of embed to title with text "Bans Logs"
2407 set the colour of the embed to Red
2408 add split field named "Staff" with value "%player%" to embed
2409 add split field named "Banned" with value "%arg-1%" to embed
2410 add split field named "Banned for" with value "%arg-2%" to embed
2411 set the image of embed to "https://mc-heads.net/avatar/%arg-1%"
2412 set the thumbnail of embed to "https://cdn.discordapp.com/attachments/600756584624422954/603190658299199499/TuberS.png"
2413 set the timestamp of embed to now
2414 send the last created embed to channel with id "604916572796223488" with "TuberS"
2415 kick arg 1 due to {_r}
2416 ban arg 1 due to {_r}
2417
2418command /unban [<offline player>] [<text>]:
2419 permission: rank.jrmod
2420 permission message: &cYou don't have access to that command.
2421 trigger:
2422 if arg 1 is not set:
2423 send "&c/unban <player>"
2424 else:
2425 send "%nl% &c%player% &7unbanned &c%arg 1%&7.%nl% " to all players
2426 unban arg 1
2427
2428command /tempban [<offline player>] [<text>] [<text>]:
2429 permission: rank.mod
2430 permission message: &cInsufficient Permissions.
2431 trigger:
2432 if argument 1 is not set:
2433 send "&c[Server] &7Usage: &c/tempban <player> [<reason>] <timespan>"
2434 else:
2435 if argument 2 is not set:
2436 send "&c[Server] &7Usage: &c/tempban <player> [<reason>] <timespan>"
2437 else:
2438 if arg-3 is set:
2439 set {_t} to toTimespan(arg 3)
2440 if {_t} is not set:
2441 send "&cInvalid Time!"
2442 else:
2443 set {_r} to "%nl% &cYou've been banned!%nl%%nl% &cPunished by: &7%player%%nl% &cReason: &7%arg 2%%nl% &cTimespan:&7 %{_t}%%nl% "
2444 set {tempban.%arg-1%} to now
2445 set {tempbantime.%arg-1%} to {_t}
2446 kick arg-1 due to {_r}
2447 send "%nl% &c%player% &7banned &c%arg 1% &7for &c%arg 2%&7. &c[%{_t}%]%nl% " to all players
2448
2449 create embed:
2450 set the title of embed to title with text "Ban"
2451 set the colour of the embed to Red
2452 add split field named "Staff" with value "%player%" to embed
2453 add split field named "Banned" with value "%arg-1%" to embed
2454 add split field named "Ban For" with value "%arg-2%" to embed
2455 add field named "Time span" with value "%{_t}%" to embed
2456 set the image of embed to "https://mc-heads.net/avatar/%arg-1%"
2457 set the thumbnail of embed to "https://cdn.discordapp.com/attachments/600756584624422954/603190658299199499/TuberS.png"
2458 set the timestamp of embed to now
2459 send the last created embed to channel with id "604916572796223488" with "TuberS"
2460
2461on join:
2462 if {tempban.%player%} is set:
2463 set {_waited} to difference between {tempban.%player%} and now
2464 if {_waited} is less than {tempbantime.%player%}:
2465 set {_waited2} to difference between {tempbantime.%player%} and {_waited}
2466 set {_r} to "&c[Server] &cYou &7are tempbanned for &c%{_waited2}%&7."
2467 kick player due to {_r}
2468 send "&c[Bans] &c%player% &7tried to join, but is banned for &c%{_waited2}%" to all players where [input has permission "staff"]
2469 else:
2470 delete {tempban.%player%}
2471 delete {tempbantime.%player%}
2472 unban player
2473
2474command /kick [<offline player>] [<text>]:
2475 permission: rank.jrmod
2476 permission message: &cYou don't have access to that command.
2477 trigger:
2478 if arg 2 is not set:
2479 send "&c/kick <player> <reason>"
2480 else:
2481 send "%nl% &c%player% &7kicked &c%arg 1% &7for &c%arg 2%&7.%nl% " to all players
2482 set {_r} to "%nl% &cYou've been kicked!%nl%%nl% &cPunished by: &7%player%%nl% &cReason: &7%arg 2%%nl% "
2483 add "(%now%) &c%player% &7kicked &c%arg 1% &c[%arg 2%]" to {punishments::%arg 1's uuid%::*}
2484 kick arg 1 due to {_r}
2485
2486command /mute [<offline player>] [<text>] [<text>]:
2487 permission: rank.jrmod
2488 permission message: &cYou don't have access to that command.
2489 trigger:
2490 if arg 3 is not set:
2491 send "&c/mute <player> <time | forever> <reason>"
2492 else:
2493 if arg 2 is "forever":
2494 send "%nl% &c%player% &7muted &c%arg 1% &7for &c%arg 3%&7.%nl% " to all players
2495 add "(%now%) &c%player% &7muted &c%arg 1% &c[%arg 3%]" to {punishments::%arg 1's uuid%::*}
2496 set {mute::%arg 1's uuid%} to "%nl% &cYou've been muted!%nl%%nl% &cPunished by: &7%player%%nl% &cReason: &7%arg 3%%nl% "
2497 mute(player, arg-1, arg-2, "Forever")
2498 else:
2499 set {_t} to toTimespan(arg 2)
2500 if {_t} is not set:
2501 send "&cInvalid Time!"
2502 else:
2503 send "%nl% &c%player% &7muted &c%arg 1% &7for &c%arg 3%&7. &c[%{_t}%]%nl% " to all players
2504 add "(%now%) &c%player% &7muted &c%arg 1% &c[%arg 3%] &c%{_t}%" to {punishments::%arg 1's uuid%::*}
2505 set {mute::%arg 1's uuid%} to "%nl% &cYou've been muted!%nl%%nl% &cPunished by: &7%player%%nl% &cReason: &7%arg 3%%nl% &cLength: &7%{_t}%%nl% &cTime muted: &7%now%%nl% "
2506 set {mutet::%arg 1's uuid%} to {_t} from now
2507 set {mutet2::%arg 1's uuid%} to {_t}
2508 create embed:
2509 set the title of embed to title with text "Mute Logs"
2510 set the colour of the embed to Red
2511 add split field named "Staff" with value "%player%" to embed
2512 add split field named "Muted" with value "%arg-1%" to embed
2513 add split field named "Muted for for" with value "%arg-3%" to embed
2514 add field named "Time span" with value "%{_t}%" to embed
2515 set the image of embed to "https://mc-heads.net/avatar/%arg-1%"
2516 set the thumbnail of embed to "https://cdn.discordapp.com/attachments/600756584624422954/603190658299199499/TuberS.png"
2517 set the timestamp of embed to now
2518 send the last created embed to channel with id "604916572796223488" with "TuberS"
2519
2520command /unmute [<offlineplayer>]:
2521 permission: rank.jrmod
2522 permission message: &cYou don't have access to that command.
2523 trigger:
2524 if arg 1 is not set:
2525 send "&c/unmute <player>"
2526 else:
2527 send "%nl% &c%player% &7unmuted &c%arg 1%&7.%nl% " to all players
2528 delete {mute::%arg 1's uuid%}
2529
2530command /warn [<offlineplayer>] [<text>]:
2531 permission: rank.jrmod
2532 permission message: &cYou don't have access to that command.
2533 trigger:
2534 if arg 2 is not set:
2535 send "&c/warn <player> <reason>"
2536 else:
2537 send "%nl% &c%player% &7warned &c%arg 1% &7for &c%arg 2%&7.%nl% " to all players
2538 add "(%now%) &c%player% &7warned &c%arg 1% &c[%arg 2%]" to {punishments::%arg 1's uuid%::*}
2539
2540command /history [<offlineplayer>]:
2541 permission: rank.jrmod
2542 permission message: &cYou don't have access to that command.
2543 trigger:
2544 if arg 1 is not set:
2545 send "&c/history <player>"
2546 else:
2547 loop {punishments::%arg 1's uuid%::*}:
2548 add "%loop-value%%nl%&f" to {_p::*}
2549 set {_p2} to "%{_p::*}%"
2550 replace all ", " and " and" with "" in {_p2}
2551 set {_p2} to "No Punishments" if {_p2} is "<none>"
2552 send ""
2553 send "<tooltip:%{_p2}%> &c%arg 1%'s Punishments <hover>"
2554 send ""
2555
2556
2557function toTimespan(t: text) :: timespan:
2558 set {_conversion::s} to "seconds"
2559 set {_conversion::m} to "minutes"
2560 set {_conversion::h} to "hours"
2561 set {_conversion::d} to "days"
2562 set {_l} to length of {_t}
2563 set {_a} to 1 if {_l} is 2
2564 set {_a} to 2 if {_l} is 3
2565 set {_l::1} to first {_a} characters of {_t}
2566 set {_l::2} to last character of {_t}
2567 set {_t} to "%{_l::1}% %{_conversion::%{_l::2}%}%"
2568 return ({_t} parsed as timespan)
2569
2570on chat:
2571
2572 if {mute::%player's uuid%} is set:
2573 if {mutet::%player's uuid%} is not set:
2574 send {mute::%player's uuid%}
2575 cancel event
2576 else:
2577 if difference between {mutet::%player's uuid%} and now is greater than {mutet2::%player's uuid%}:
2578 send "&c[Server] &cYou have been unmuted!"
2579 delete {mute::%player's uuid%}
2580 delete {mutet::%player's uuid%}
2581 delete {mutet2::%player's uuid%}
2582 else:
2583 send {mute::%player's uuid%}
2584 cancel event