I want to make the storage 2^63 - 1, but when I test it out the GUI says Infinite, but the IntValue is -9223372036854775808 instead of 9223372036854775808. Does anyone know how to fix that? Here's the script:
print("test 1") --If player owns Infinite storage gamepass print("test 2") game.Players.PlayerAdded:Connect(function(plr) print("test 3") local MarketPlaceService = game:GetService("MarketplaceService") local GamePassId = 12251737 local storage = game.StarterGui.MainGUI.StorageBar.StorageAmount.Storage local storageText = game.StarterGui.MainGUI.StorageBar.StorageAmount local userID = plr.UserId print("test 4") if MarketPlaceService:UserOwnsGamePassAsync(userID,GamePassId)then print(plr.Name .. " owns gamepass.") storage.Value = 2^63 - 1 storageText.Text = "Infinite" print("test 5") end end)
Have you tried just simply typing the whole value out but one less?
print("test 1") --If player owns Infinite storage gamepass print("test 2") game:GetService("Players")PlayerAdded:Connect(function(plr) print("test 3") local MarketPlaceService = game:GetService("MarketplaceService") local GamePassId = 12251737 local storage = game.StarterGui.MainGUI.StorageBar.StorageAmount.Storage local storageText = game.StarterGui.MainGUI.StorageBar.StorageAmount local userID = plr.UserId print("test 4") if MarketPlaceService:UserOwnsGamePassAsync(userID,GamePassId)then print(plr.Name .. " owns gamepass.") storage.Value = 9223372036854775807 storageText.Text = "Infinite" print("test 5") end end)
Ok, I fixed it. All I did was just make the number a digit less, so now it works I guess