This repository has been archived on 2025-04-15. You can view files and clone it, but cannot push or open issues or pull requests.
Gamify-Life/Gamify Life/Magic Great Ball Stuffs/magic_great_ball.gd
2025-04-15 11:55:58 -07:00

29 lines
932 B
GDScript

extends Node2D
@export var No_Strings: PackedStringArray
@export var Probably_Not_Strings: PackedStringArray
@export var Maybe: PackedStringArray
@export var Probably_Strings: PackedStringArray
@export var Yes_Strings: PackedStringArray
@onready var Shake_Button = get_node("GBall/Label")
func _on_shake_button_pressed():
get_node("AnimationPlayer").play("Shake")
func Select_Thing():
randomize()
match randi_range(1, 5):
1:
Shake_Button.text = No_Strings[randi_range(0, No_Strings.size() - 1)]
2:
Shake_Button.text = Probably_Not_Strings[randi_range(0, No_Strings.size() - 1)]
3:
Shake_Button.text = Maybe[randi_range(0, No_Strings.size() - 1)]
4:
Shake_Button.text = Probably_Strings[randi_range(0, No_Strings.size() - 1)]
5:
Shake_Button.text = Yes_Strings[randi_range(0, No_Strings.size() - 1)]
func _on_back_pressed():
get_tree().change_scene_to_file("res://Menu Stuffs/Scene/Main Menu.tscn")