Skip to content

Instantly share code, notes, and snippets.

@fabtjar
Created October 30, 2025 10:08
Show Gist options
  • Select an option

  • Save fabtjar/b839222fd7326cc26a1019b03e2524a3 to your computer and use it in GitHub Desktop.

Select an option

Save fabtjar/b839222fd7326cc26a1019b03e2524a3 to your computer and use it in GitHub Desktop.
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/UI }
using { /UnrealEngine.com/Temporary/SpatialMath }
using { /Fortnite.com/UI }
using { /Verse.org/Colors }
ui_manager := class:
MoneyTextSize:float = 50.0
MoneyText:text_block = text_block:
DefaultShadowOffset := option. vector2{X := 2.0, Y := 3.0}
DefaultShadowColor := NamedColors.Black
DefaultShadowOpacity := 0.8
DefaultTextColor := NamedColors.White
DefaultJustification := text_justification.Center
MoneyChangeEvent:event() = event() {}
Init(Player:player):void=
MoneyPanel := overlay:
Slots := array:
# Frame
overlay_slot:
Widget := color_block:
DefaultOpacity := 0.0
DefaultDesiredSize := vector2{X := 200.0, Y := 100.0}
# Panel
overlay_slot:
HorizontalAlignment := horizontal_alignment.Center
VerticalAlignment := vertical_alignment.Center
Widget := color_block:
DefaultColor := NamedColors.Black
DefaultOpacity := 0.5
DefaultDesiredSize := vector2{X := 200.0, Y := 80.0}
# Text
overlay_slot:
HorizontalAlignment := horizontal_alignment.Center
VerticalAlignment := vertical_alignment.Center
Widget := MoneyText
MoneyText.SetTextSize(MoneyTextSize)
Widget := overlay:
Slots := array:
overlay_slot:
Padding := margin{Top := 20.0}
HorizontalAlignment := horizontal_alignment.Center
VerticalAlignment := vertical_alignment.Top
Widget := MoneyPanel
if (PlayerUI := GetPlayerUI[Player]):
PlayerUI.AddWidget(Widget)
UpdateMoney(NewMoney:int):void=
MoneyText.SetText(PlainText("{NewMoney}"))
if (NewMoney > 0):
spawn. MoneyChangeAnim()
MoneyChangeAnim()<suspends>:void=
MoneyChangeEvent.Signal()
race:
MoneyChangeEvent.Await()
block:
MoneyText.SetTextColor(NamedColors.Yellow)
var Size:float = MoneyTextSize * 1.5
loop:
MoneyText.SetTextSize(Size)
Sleep(0.03)
set Size -= 5.0
if (Size <= MoneyTextSize):
break
MoneyText.SetTextSize(MoneyTextSize)
MoneyText.SetTextColor(NamedColors.White)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment