I am attempting to make a universe where the hub you can buy games and get some for free, but that's not the problem. The "Wallet GUI" is not operational. My script will be below. It is printing: Error in the GUI.
local Read = LoadLibrary("RbxUtility").DecodeJSON; local Frame = script.Parent.Frame local TicketsLabel, RobuxLabel = Frame.Tickets.Amount, Frame.Robux.Amount; while true do local success, currency = ypcall(function() return game:HttpGet("https://api.roblox.com/my/balance", true) end); if success then local currency = Read(currency); TicketsLabel.Text = tostring(currency.tickets); RobuxLabel.Text = tostring(currency.robux); else TicketsLabel.Text = "Error"; RobuxLabel.Text = "Error"; end wait(5) end
Heard of HttpService?
local Frame = script.Parent.Frame local TicketsLabel = Frame.Tickets.Amount local RobuxLabel = Frame.Robux.Amount while true do local currency = game:GetService("HttpService"):JSONDecode(game:GetService("HttpService"):GetAsync("https://api.roblox.com/my/balance", true)) TicketsLabel.Text = tostring(currency[2]) RobuxLabel.Text = tostring(currency[1]) wait(5) end
:) I've removed some potentially glitchy stuff from the script and tidied it up. You don't exactly need ypcall since it's probably not going to error. If it was to, then nobody would be in your game (ROBLOX server crash).