Date: 2017/01/01 18:02:13 UTC-08:00
Type: Denizen Script
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
DoubleJump:
type: world
debug: true
speed: 0
events:
on player joins:
- wait 1t
- adjust <player> can_fly:true
on player changes gamemode to creative:
- wait 1t
- flag player creative
on player changes gamemode to survival:
- wait 1t
- flag player creative:!
on player walks:
- if <player.has_flag[creative]||false> {
- queue clear
}
- if <c.new_location.y.is[LESS].than[<c.old_location.y>]||false> {
- if <player.has_flag[hasjumped]> {
- queue clear
}
- if <player.location.sub[0,0.1,0].material.is_solid||false> && <player.has_flag[hasjumped]||false> {
- adjust <player> can_fly:true
- flag player hasjumped:!
- queue clear
}
- if <c.new_location.y.sub[<c.old_location.y>].is[OR_MORE].than[0.2]> && <c.new_location.y.sub[<c.old_location.y>].is[OR_LESS].than[1.0]> && !<c.new_location.y.sub[<c.old_location.y>].is[==].to[0.5]> {
- flag player canfly
- queue clear
}
on player starts flying:
- if <player.has_flag[canfly]||false> {
- adjust <player> velocity:<player.location.direction.vector.mul[2.0].add[0,1,0]>
- adjust <player> can_fly:false
- flag player hasjumped
- flag player canfly:!
}
on player quit:
- adjust <player> can_fly:true
- flag player hasjumped:!
- flag player creative:!
- flag player canfly:!