Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- Basic Data Store by darraghd493
- A basic volatile Lua data store backed by a table.
- ]]
- local Library = {
- Store = {};
- }
- Library.__index = Library
- function Library.new()
- return setmetatable({
- Store = {};
- }, Library)
- end
- function Library:Set(key: string, value: any)
- self.Store[key] = value
- end
- function Library:Get(key: string)
- return self.Store[key]
- end
- function Library:Remove(key: string)
- self.Store[key] = nil
- end
- function Library:Clear()
- self.Store = {}
- end
- return Library
Advertisement
Add Comment
Please, Sign In to add comment