Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_menu_flowey_Step_0

(view raw script w/o annotations or w/e)
1
if (waiter == 1)
2
    return;
3
if (choice == 0)
4
{
5
    if (global.left_keyp && p[2] == true)
6
    {
7
        p[2] = false
8
        p[1] = true
9
    }
10
    if (global.right_keyp && p[1] == true)
11
    {
12
        p[2] = true
13
        p[1] = false
14
    }
15
    if (keyboard_multicheck_pressed(0) == true)
16
    {
17
        audio_play_sound(snd_mainmenu_select, 1, 0)
18
        if (p[1] == true)
19
            choice = 1
20
        if (p[2] == true)
21
            choice = 2
22
    }
23
}
24
else if instance_exists(obj_ending_flowey)
25
{
26
    if (obj_ending_flowey.sprite_index != spr_flowey_enter)
27
    {
28
        obj_ending_flowey.sprite_index = spr_flowey_enter
29
        obj_ending_flowey.image_index = obj_ending_flowey.image_number - 1
30
        obj_ending_flowey.image_speed = -0.25
31
    }
32
    if (obj_ending_flowey.image_index <= 0)
33
    {
34
        instance_destroy(obj_ending_flowey)
35
        if (choice == 1)
36
        {
37
            audio_play_sound(mus_cymbal, 10, 0)
38
            alarm[1] = 1
alarm[1]

alarm[1] = 1 __view_set((0 << 0), 0, ((__view_get((0 << 0), 0)) + (random_range((-sh), sh)))) __view_set((1 << 0), 0, ((__view_get((1 << 0), 0)) + (random_range((-sh), sh)))) sh += 0.01
39
            instance_create(0, 0, obj_transition_white)
40
            if file_exists("Save.sav")
41
                file_delete("Save.sav")
42
            ini_open("Save02.sav")
43
            ini_write_real("00", "02", 0)
44
            ini_write_real("00", "03", 0)
45
            ini_write_real("00", "04", 0)
46
            ini_close()
47
        }
48
        else
49
            game_end()
50
    }
51
}