> For the complete documentation index, see [llms.txt](https://docs.picklemods.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.picklemods.com/paid-resources/rewards-system/exports.md).

# Exports

## Server-Side:

```lua
exports.pickle_rewards:AddAchievement(source, achievementId)
--Adds specified achievement for source.
```

```lua
arguments: source, achievementId
```

```lua
exports.pickle_rewards:RemoveAchievement(source, achievementId)
--Removes specified achievement for source.
```

```
arguments: source, achievementId
```

<pre class="language-lua"><code class="lang-lua"><strong>exports.pickle_rewards:GetAchievementStatus(source, achievementId)
</strong></code></pre>

```lua
arguments: source, optional: achievementId
--Returns what the Acievement status is of a specific achievement.
```

```lua
exports.pickle_rewards:IsAchievementComplete(source, achievementId)
```

```lua
arguments: source, achievementId
--Returns if an Achievement is completed, but not claimed.
```

```lua
exports.pickle_rewards:IsAchievementClaimed(source, achievementId)
```

```lua
arguments: source, achievementId
--Retuns if an Achievement is claimed.
```

```lua
exports.pickle_rewards:AddObjectiveValue(source, achievementId, optionId, value)
--Adds the value of the achievements certain option.
```

```lua
arguments: source, achievementId, optionId, value 
--value is numerical(1 or greater). If value needs to be true, set to 1.
```

```lua
exports.pickle_rewards:RemoveObjectiveValue(source, achievementId, optionId, value)
--Removes the value of the achievements certain option.
```

```lua
arguments: source, achievementId, optionId, value 
--value is numerical(1 or greater). If value needs to be true, set to 1.
```

```lua
exports.pickle_rewards:SetObjectiveValue(source, achievementId, optionId, value)
--Sets the value of the achievements certain option.
```

```lua
arguments: source, achievementId, optionId, value 
--value is numerical(1 or greater). If value needs to be true, set to 1.
```

```lua
exports.pickle_rewards:GetObjectiveValue(source, achievementId, optionId)
--Returns the value of the achievements certain option.
```

```lua
arguments: source, achievementId, optionId
```

```lua
exports.pickle_rewards:AddSpins(source, amount)--Adds Spins to source.
```

```lua
arguments: source, amount
--amount is numerical.
```

```lua
exports.pickle_rewards:RemoveSpins(source, amount)--Removes Spins from source.
```

```lua
arguments: source, amount
--amount is numerical.
```

```lua
exports.pickle_rewards:SetSpins(source, amount)
```

```lua
arguments: source, amount
--amount is numerical.
```

```lua
exports.pickle_rewards:GetSpins(source)
```

```lua
arguments: source
--returns a value.
```

```lua
exports.pickle_rewards:GetStreakDay(source)
```

```lua
arguments: source
--Returns the current day of streak.
```

```lua
exports.pickle_rewards:GetReferralCode(source)
```

```lua
arguments: source
--Returns the referral code that's used to invite others.
```

```lua
exports.pickle_rewards:GetReferredCode(source)
```

```lua
arguments: source
--Returns the active referrer of source.
```

```lua
exports.pickle_rewards:GetPlaytime(source)
```

```lua
arguments: source
--Returns the total playtime of source.
```

```lua
exports.pickle_rewards:GetSessionTime(source)
```

```lua
arguments: source
--Returns the total playtime of source in the currect session. 
--(Closing game will reset this)
```

## Client-Side:

```lua
exports.pickle_rewards:OpenMenu(section)
```

```lua
arguments: section
--Opens the menu to a specific section.
```

```lua
exports.pickle_rewards:CloseMenu()
--Closes the menu.
```

```lua
exports.pickle_rewards:IsInMenu()
--Returns if you're in the menu.
```

```lua
exports.pickle_rewards:GetPlaytime()
--Returns the players total play time.
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.picklemods.com/paid-resources/rewards-system/exports.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
