{"id":"cerebrallabs/ceebral","name":"ceebral","scope":"cerebrallabs","platform":"roblox","description":"A player state management tool","version":"0.0.3","latest":"0.0.3","versions":["0.0.3"],"license":"MIT","licenseRating":"safe","licenseCaveats":["The package archive does not include its license text; the license is declared in its manifest metadata."],"licenseVerified":false,"dependencies":{},"integrity":"6f78c5589b61fcecaa319191d59339053ab5fed78c230b4568e7932e716c9cec","likes":0,"downloads":0,"install":"forest install cerebrallabs/ceebral","url":"https://forest.dev/p/roblox/cerebrallabs/ceebral","files":"https://api.forest.dev/ai/package/roblox/cerebrallabs/ceebral/files","readme":"<div align=\"center\">\r\n\r\n# Cerebral\r\n**Roblox Player State Management**\\\r\n*watch my data for me?*\r\n\r\n[About](#about) |\r\n[Supported Platforms](#supported-platforms) |\r\n[Use](#use)\r\n\r\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\r\n\r\n</div>\r\n\r\n> [!WARNING]\r\n> Cerebral is in its early stages. So much so that there is no current version.\r\n\r\n> [!WARNING]\r\n> Cerebral does not currently interact with DataStore.\r\n\r\n## About\r\n**Cerebral** is a Roblox Player State Management Tool. This tool is created to make managing Player Data through the server as seemeless and error free as possible, so you can spend more time the fun stuff rather than wondering why your *Money* is not increasing.\r\n\r\n## Supported Platforms\r\n**Cerebral** is currently posted on [Wally](www.wally.run) under `cerebrallabs/cerebral`. Roblox Store support is planned.\r\n\r\n## Use\r\n### Set Up\r\n```luau\r\nlocal Players = game:GetService(\"Players\")\r\n\r\nlocal Cerebral = require(--[[path to Cerebral]])\r\n\r\nCerebral:DefineAgentAttributes({\r\n    \"money\" = Cereberal:Create(\"number\"),\r\n    \"xp\" = Cereberal:Create(\"number\"),\r\n    \"is_admin\" = Cerebral:Create(\"boolean\"),\r\n    \"pet_name\" = Cerebral:Create(\"string\"),\r\n})\r\n\r\nlocal function PlayerAdded(player: Player)\r\n    local agent: Cerebral.Agent\r\n    local playerData\r\n\r\n    agent = Cerebral:NewAgent(player)\r\n    playerData = -- Some dataStore getter function\r\n\r\n    Cerebral:NewAgent(player, playerData)\r\nend\r\n\r\nlocal function RemovePlayer(player: Player)\r\n    Cerebral:RemoveAgent(player)\r\nend\r\n\r\nPlayers.PlayerAdded:Connect(PlayerAdded)\r\nPlayers.PlayerRemoved:Connect(RemovePlayer)\r\n```\r\n\r\n### Use\r\nImagine a buy station.\r\n```luau\r\nlocal Cerebral = require(--[[path to Cerebral]])\r\nlocal proximitySensor = script.--[[path to proximitySensor]]\r\n\r\nlocal COST = 50\r\n\r\nproximitySensor.Triggered:Connect(function(player: Player)\r\n    local playerMoney = Cerebral:GetAgent(player):GetAttribute(\"money\")\r\n    if playerMoney:Get() >= COST then\r\n        playerMoney:Decrement(COST)\r\n        --[[award player whatever this proximitySensor is connected to]]\r\n    else\r\n        --[[notify user \"NOT ENOUGH MONEY]]\r\n    end\r\nend)\r\n```","readmeTruncated":false}