Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to make an Auto Cash Collect script for my tycoon game?

Asked by 5 years ago

I am making a tycoon game called Minecraft Tycoon, that uses Zednov's Tycoon Kit. Doesn't anyone know how to make it so you don't need to step on that Cash Collector brick to get the money?

3 answers

Log in to vote
2
Answered by 5 years ago
Edited 5 years ago

My advice in your position is don't use tycoon kits they aren't as customizable as they seem to appear if you want to get a job done it's better to just do it yourself. It may take you some time but in the long run, I can promise you it's worth the time and effort. Just start by learning basic Lua and move up from there.

If this helps an upvote and solve would be appreciated :)

  • Best Regards, - Syn
0
Well yes, not using Tycoons Kits might be better, but i have seen and played some Roblox games that use Zednov's Tycoon Kit too but they actually have an auto cash collect script too, like Farm Tycoon and Bunny Tycoon. MarkyWolfai 0 — 5y
0
Yes, I never said you couldn't do it. You just need to be able to understand scripts themselves. If you do understands scripts you can go edit tycoon kit script to implement what you want. johndeer2233 439 — 5y
0
Yeah, I understand scripting but the problem is that I don't exactly know what should be written in the script and where the script should be put in. Maybe you know any people that understand scripting an auto cash collect for a tycoon? MarkyWolfai 0 — 5y
Ad
Log in to vote
0
Answered by
mqop3434 -64
4 years ago
Edited 4 years ago

add a bool value to your tycoon team then rename it AutoCollect then set the value to true then lol its correct change the purchase handler to what looks like this :

001--[[
002    All configurations are located in the "Settings" Module script.
003    Please don't edit this script unless you know what you're doing.
004--]]
005local Objects = {}
006local TeamColor = script.Parent.TeamColor.Value
007local Settings = require(script.Parent.Parent.Parent.Settings)
008local Money = script.Parent.CurrencyToCollect
009local Debris = game:GetService('Debris')
010local Stealing = Settings.StealSettings
011local CanSteal = true -- don't change or else you won't be able to steal currency
012 
013script.Parent.Essentials.Spawn.TeamColor = TeamColor
014script.Parent.Essentials.Spawn.BrickColor = TeamColor
015 
View all 202 lines...
0
easy mqop3434 -64 — 4y
Log in to vote
-1
Answered by 5 years ago

Easy,

First you'd need to lay a block down, usually making this block the same size of a user so that when they step onto it it can fit. Then you would need to insert 'Script' inside the block so that this functions and it can add money. Group the part and name the group how much money you would want it to give. For example, "5000 Cash", so that you remember on how much cash you want the script to give. Name the part that is inside the group 'Head' as this is the leading script that it will be giving. Insert a script and ForceField inside of what you named 'Head'.

Insert this script inside of the script:

local ting = 0

function onTouched(hit)

01if ting == 0 then
02ting = 1
03check = hit.Parent:FindFirstChild("Humanoid")
04 
05if check ~= nil then
06 
07    local user = game.Players:GetPlayerFromCharacter(hit.Parent)
08    local stats = user:findFirstChild("leaderstats")
09 
10    if stats ~= nil then
11        local cash = stats:findFirstChild("Cash")---Verander dit naar de naam dat ie moet geven Bijv: Leaderboard die naam is Cash Maak Dat <<<<< Dan Cash !!!!
12        cash.Value  = cash.Value  +500 --  Verander 1000 in wat je wil
13    wait(5) --Verander De 0.1 in wat jij wil hoelang the knop onbruikbaar is
14    end
15 
16end
17 
18ting = 0
19end

end

script.Parent.Touched:connect(onTouched)

Insert 'Humanoid' inside of what is grouped so that the script can detect the users Humanoid and give the amount of money you desire it to give. And your all done! I hope this helped you, as there is not many tutorials on this. I may post a tutorial on Youtube on how this works and how to make it so that you can understand better on how to do this.

0
He asked for the complete opposite try to read the question next time before answering. johndeer2233 439 — 5y
0
I HATE THIS AWNSER! NillaTheCat12345 14 — 4y

Answer this question