Undertale script viewer

← back to main script listing

gml_Object_obj_fisttargettest_Other_13

(view raw script w/o annotations or w/e)
1
thensc = 0;
2
sc = abs(floor(check.x / check.hspeed) - floor(fatalx / check.hspeed));
3
if (sc < 26)
4
    thensc = 10;
5
if (sc < 20)
6
    thensc = 15;
7
if (sc < 16)
8
    thensc = 30;
9
if (sc < 12)
10
    thensc = 50;
11
if (sc < 8)
12
    thensc = 75;
13
if (sc < 5)
14
    thensc = 83;
15
if (sc < 3)
16
    thensc = 90;
17
if (sc < 2)
18
    thensc = 95;
19
if (sc < 1)
20
{
21
    thensc = 110;
22
    check.x = fatalx;
23
}
24
myscore += thensc;
25
fadebar = instance_create(check.x, check.y, obj_fadebar);
26
if (sc < 1)
27
{
28
    fadebar.image_index = 2;
29
    fadebar.image_speed = 1;
30
    snd_play(snd_victor);
31
}
32
else if (sc < 5)
33
{
34
    fadebar.image_index = 1;
35
    snd_play(snd_hit);
36
}
37
with (check)
38
    instance_destroy();