-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathhealScp.ser
More file actions
30 lines (24 loc) · 768 Bytes
/
Copy pathhealScp.ser
File metadata and controls
30 lines (24 loc) · 768 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# Disabled by default: remove # from the filename to enable this script.
!-- CustomCommand healscp
-- description "heals a random SCP"
-- availableFor player
-- requireSender
-- cooldown 10s
# dont allow SCPs to use this command
if {@sender -> team} is "SCPs"
stop
end
# get a random SCP that is not a SCP-079
@target = Take {Except @scpPlayers @scp079Players} 1
# check if the was no viable target
if {AmountOf @target} is 0
Reply "There is no SCP to heal"
stop
end
# get 5% of the SCP's max health
$healAmount = Round ({@target -> maxHealth} * 0.05)
# heal
Heal @target $healAmount
# inform
Broadcast @target 4s "{@sender -> name} healed you with {$healAmount} HP!"
Reply "You have healed {@target -> name} ({@target -> role}) by {$healAmount} HP!"