Amazing kit! Especially for begginners! Keep up the good work.
its not supposed to be a hate comment. its thiings that doesnt make it a robbery and what he needs to add to make it.
“Not cool dude.”
I don’t really like this kit it constrains you to much. Firstly it makes you use an inefficient saving method. It also makes your system based on ‘Cash’ not everyone actually has cash as their leaderstat name.
game.Players.PlayerAdded:Connect(function(player)
local leader = Instance.new("Folder",player)
leader.Name = "leaderstats"
local Cash = Instance.new("IntValue",leader)
Cash.Name = "Money"
Cash.Value = ds:GetAsync(player.UserId) or 50 --50 is the starting number. Change it to the number you wish to start with,
ds:SetAsync(player.UserId, Cash.Value)
Cash.Changed:Connect(function()
ds:SetAsync(player.UserId, Cash.Value)
end)
end)
game.Players.PlayerRemoving:Connect(function(player)
ds:SetAsync(player.UserId, player.leaderstats.Money.Value)
end).
Why are you setting the datastore every time your cash changes, this is really inefficient and uses up your datastore request budget really quick. A good way to save is save the cash only when the player leaves with periodical auto saves.
It also has no retry mechanism. What happens if getAsync fails and produces an error?
https://gyazo.com/98da2134144deeee1470a0c31621addc
Well now the cash will be at 0. That’s not the problem but the following is a problem.
https://gyazo.com/d5ea045158519857818d43ecdf4d8c77
Your setting regardless of if GetAsync failed. If GetAsync failed in the beginning the cash would be 0, and now your setting that into the datastore corrupting the player’s data.
Btw all you need is one script which handles the backend of the robbing system, having multiple scripts modifying the same thing is considered bad practice as it violates the single responsibility principle.
Overall, I think this system is to constrained, inefficient, and is really badly organized.
For the people who are wondering why this is broken it actually isn’t because of the kit
Datastores don’t work unless if you publish your game, so it won’t work if you use the sample place. That’s why the script errors on line2, making the rest of the script not run.
https://gyazo.com/eb2fd7aca9f3c6b1266e526f22babc2e
The extensions have the start robbery part. Things do happen, and yes it is not only made for robberies. It does have leaderstats. They are DataStores and have to be played in a published game:
It comes packaged with its own DataStore.
Wait it doesn’t show up? I thought it did. What extension did you use?
Most of the things were made in 2018. I just fixed a few things up. I was not that experienced back then. Also it was made for published games. I may modify the starting kit to have a leaderstat in a local place.
Remember, this kit is still being developed. Things may change in the future.
You need to use extensions to do that they have cash adder(leaderstats) and cash button extension which i think automatically uses the remote events and stuff that you get from the kit
I 100% agree, if it is not a working kit there is no reason to but it out there.
It is a working kit. You just need to get an extension in order to use it.
This doesn’t really make sense try to fix this topic up so we can understand more plz add some pictures that would help
What is the point of the robbery kit if the kit does not supply the needs that developers need to make the robbery happen.
smh, at least he’s trying. give him some respect for the guy atleast.
It is in extensions. You need to get an extension in order to start the robbery.
You should rename the kit to “base” and call the extensions Kits, so you wont get people saying these. but do not touch the title
Thank you for making this ‘Open Sourced’, I could use this for practicing programming Lua.
Added Gas Station kit:
Gas Station Kit is a Hold E system. I also clairified some things in the kit that the Base is required.
Questions? Suggestions? Feel free to reply!
I also have a question:
- Yes
- No
0 voters
Pros for voting yes:
- Easier to set up
- It will add the base in automatically
- Updates the kits and base every time the plugin updates
Cons for voting yes:
- It will deprecate .Rbxl file and Free Model.
- .Rbxl file will be removed and no longer obtainable, but free model will
- Would need to update the plugin to get new features and bug fixes
A plugin will be created when I have time to create it. If you have a suggestion for the plugin, feel free to reply!
v1.1.0 has been released! It adds a whole not of new features, such as AutoSetup, and Attributes. You can also modify an attribute, and it will take effect in the whole system! The kit and the bases are now all in one, as requested before.
Oh, and I don’t know how to create plugins yet. I will instead turn it into a Module when I have time.