Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions docs/api-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ The following code sample, placed within a child `LocalScript` of a `GuiButton`,
``` lua title="Inventory Toggle Button" linenums="1"
--!strict

local ReplicatedStorage = game:GetService("ReplicatedStorage")
const ReplicatedStorage = game:GetService("ReplicatedStorage")

local Purse = require(ReplicatedStorage.Purse)
const Purse = require(ReplicatedStorage.Purse)

local button = script.Parent
const button = script.Parent

local function onButtonActivated()
const function onButtonActivated()
if Purse.OpenClose then
Purse.OpenClose()
end
Expand Down Expand Up @@ -97,9 +97,9 @@ The following code sample, placed within a child `LocalScript` of `StarterPlayer
``` lua title="Detect Inventory State" linenums="1"
--!strict

local ReplicatedStorage = game:GetService("ReplicatedStorage")
const ReplicatedStorage = game:GetService("ReplicatedStorage")

local Purse = require(ReplicatedStorage.Purse)
const Purse = require(ReplicatedStorage.Purse)

Purse.StateChanged.Event:Connect(function(isNowOpen)
if isNowOpen then
Expand Down
8 changes: 4 additions & 4 deletions src/Attribution.client.luau
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@
Thank you for supporting Purse.
]]

local MarketplaceService = game:GetService("MarketplaceService")
local RunService = game:GetService("RunService")
const MarketplaceService = game:GetService("MarketplaceService")
const RunService = game:GetService("RunService")

local VERSION = "1.1.5"
const VERSION = "1.1.5"

-- Print attribution. Do not modify without reading above
if not RunService:IsStudio() then
Expand All @@ -41,7 +41,7 @@ end
-- Check for updates. You may modify the below
local latestVersion: string?

local success, result = pcall(function()
const success, result = pcall(function()
return MarketplaceService:GetProductInfoAsync(112061170330936)
end)

Expand Down
8 changes: 4 additions & 4 deletions src/ContextAction.client.luau
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
--!strict

local ContextActionService = game:GetService("ContextActionService")
local BackpackScript = require(script.Parent)
const ContextActionService = game:GetService("ContextActionService")
const BackpackScript = require(script.Parent)

local ACTION_NAME = "BackpackToggle"
const ACTION_NAME = "BackpackToggle"

local function handleAction(actionName, inputState, _inputObject)
const function handleAction(actionName, inputState, _inputObject)
if actionName == ACTION_NAME and inputState == Enum.UserInputState.Begin then
if BackpackScript.OpenClose then
BackpackScript.OpenClose()
Expand Down
2 changes: 1 addition & 1 deletion src/CoreGuiWarn.client.luau
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--!strict

local StarterGui = game:GetService("StarterGui")
const StarterGui = game:GetService("StarterGui")

task.spawn(function()
while task.wait(3) do
Expand Down
6 changes: 3 additions & 3 deletions src/TopbarIcon.client.luau
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
--!strict

local BackpackScript = require(script.Parent)
local Icon = require(script.Parent.Parent.topbarplus)
const BackpackScript = require(script.Parent)
const Icon = require(script.Parent.Parent.topbarplus)

local icon = Icon.new()
const icon = Icon.new()
icon:modifyTheme({ "IconLabelContainer", "TargetWidth", 0 }) -- Force minimum width
icon:setLabel("backpack")
icon:setOrder(-1)
Expand Down
Loading