View difference between Paste ID: rqwdQs1V and MFvWT1zM
SHOW: | | - or go back to the newest paste.
1
options:
2
	P: &8[&aElectrified&8]&e
3
4
command /electrified [<text>]:
5
	permission: skript.op
6
	trigger:
7
		if arg 1 is "on", "enable", or "give":
8
			loop all players:
9
				set {elec} to true
10
				apply speed 1 to the loop-player for 999 days
11
				apply haste 1 to the loop-player for 999 days
12
				give loop-player 1 redstone named "Battery"
13
				set {HasBattery::%loop-player%} to true
14
				set {CanUseBattery::%loop-player%} to true
15
				broadcast "{@P} Batteries given out and effects applied!"
16-
				stop
16+
17
			set {elec} to false
18
			broadcast "{@P} Electrified ended!"
19
		if arg 1 is "reset":
20
			delete {HasBattery::*}
21
			delete {CanUseBattery::*}
22
			delete {elec}
23
			broadcast "{@P} All variables &breset!"
24
			stop
25
			
26
on login:
27
	if {elec} is true:
28
		if {HasBattery::%player%} is false:
29
			give player 1 redstone named "Battery"
30
			set {HasBattery::%player%} to true
31
			message "{@P} Battery given!" to the player
32
			
33
on right click:
34
	player's tool is redstone named "Battery":
35
		if {CanUseBattery::%player%} is false:
36
			message "{@P} You cannot use your battery, your 3 minutes hasn't gone up!"
37
		else:
38
			remove speed from the player
39
			remove haste from the player 
40
			apply haste 3 to the player for 17 seconds
41
			apply speed 2 to the player for 17 seconds
42
			broadcast "{@P} %player% is &bELECTRIFIED!"
43
			set {CanUseBattery::%player%} to false
44
			wait 18 seconds
45
			remove haste from the player
46
			remove speed from the player
47
			apply haste 1 to the player for 999 days 
48
			apply speed 1 to the player for 999 days
49
			wait 3 minutes
50
			set {CanUseBattery::%player%} to true
51
			message "{@P} You can use your battery again!"
52
			
53
on walk on water:
54
	block below the player is water
55
	block at the player is water
56
	if {elec} is true:
57
		set {_h} to health of player
58
		set {_d} to .20
59
		set player's health to ({_h} - {_d})