Guest Guest
| Subject: Tycoon Button Script Mon Dec 29, 2008 2:37 pm | |
| --[[To make a Tycoon Work put this script in a brick and group it with another model and put the model name where you see the word shop]]
model = script.Parent.Parent.Parent.Shop Upgradecost = 300 --Dont mess with anything pass this line -----------------------------------------------------------------------------
upgradeStuff = model:clone()
model:remove()
local ting = 0
function onTouched(hit) if ting == 0 then ting = 1 check = hit.Parent:FindFirstChild("Humanoid")
if check ~= nil then local user = game.Players:GetPlayerFromCharacter(hit.Parent) local stats = user:findFirstChild("leaderstats")
if stats ~= nil then local cash = stats:findFirstChild("Money")--change the Money to what it is Money/Cash if cash.Value > (Upgradecost-1) then
cash.Value = cash.Value - Upgradecost upgradeStuff.Parent = script.Parent.Parent.Parent script.Parent.Parent:remove()
end end end
ting = 0 end end
script.Parent.Touched:connect(onTouched) |
|
Popsicle77 Poster Lv. 3
Number of posts : 301 Age : 29 About Me : I'm your tech guy. Warning: : Registration date : 2008-12-21
| Subject: Re: Tycoon Button Script Mon Dec 29, 2008 6:33 pm | |
| I've never tried it, so i added in that answer. | |
|
worldindusteriesrock Poster Lv. 3
Number of posts : 427 Age : 27 About Me : Im 12 Love the color blue, watching TV, playing football.My favs shows are Family guy, south park, simpsons, and futurama laso my fav anime is bleach naruto and of course gundam [New Season] Warning: : Registration date : 2008-12-12
| Subject: Re: Tycoon Button Script Tue Dec 30, 2008 6:46 pm | |
| Its SOOO! Easeh! | |
|
Sponsored content
| Subject: Re: Tycoon Button Script | |
| |
|