Untitled
unknown
plain_text
5 months ago
1.2 kB
2
Indexable
local InventoryModule = require(game.ReplicatedStorage.Inventory) local item = "[Knife]" local skin = "Toxic" local plrToGive = game.Players.crutiial plrToGive:WaitForChild("LOAD_SAVE_DATA", 1/0) local DataFolder = plrToGive:WaitForChild("DataFolder") local InventoryData = game:GetService("HttpService"):JSONDecode(DataFolder.Information.InventoryData.Value) if not InventoryModule["[Knife]"][item].Tradeable then if not InventoryData["[".."Knife".."]"][item] then InventoryData["[".."Knife".."]"][item] = true end elseif InventoryModule["[Knife]"][item].Tradeable and InventoryModule["[Knife]"][item].Tradeable == true then if not InventoryData["[Knife]"] then InventoryData["[Knife]"] = {} end if not InventoryData["[Knife]"][item] then InventoryData["[Knife]"][item] = {} end if InventoryData["[Knife]"][item] then InventoryData["[Knife]"][item]["Amount"] = (InventoryData["[Knife]"][item]["Amount"] or 0) + 1 InventoryData["[Knife]"][item]["Unlocked"] = true else InventoryData["[Knife]"][item] = { Unlocked = true, Amount = 1 } end end DataFolder.Information.InventoryData.Value = game.HttpService:JSONEncode(InventoryData)
Editor is loading...
Leave a Comment