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

Is there anyway in this script to change the start money?

Asked by
DevingDev 346 Moderation Voter
7 years ago
Edited 7 years ago

ya i know its a pretty long scirpt but i hope its somewhere inthere i can find where or you guys can find where start money is?

    local StatList = {}
    local StatNames = {}    -- An array of stat names in order of the stats' creation.
    local StatCategories = {}   -- name->category map
    local StatCount = {}    -- Counts number of stats per category
    local StatChanged = CreateSignal()
    function AddStat(name, category, value)
        if not StatCount[category] then
            StatCount[category] = 1
        else
            StatCount[category] = StatCount[category] + 1
        end
        local stat = Instance.new('StringValue')
        stat.Name = name
        if value then stat.Value = value end
        StatList[name] = stat
        StatCategories[name] = category
        table.insert(StatNames, name)
        stat.Changed:connect(function()
            StatChanged:fire(name, stat.Value)
        end)
    end
    function SetStat(name, value)
        StatList[name].Value = value
    end
    function EachStatSorted(f)
        for _, name in pairs(StatNames) do
            f(name)
        end
    end
    function EachStat(f)
        for name, stat in pairs(StatList) do
            f(name)
        end
    end

    function UpdateGui(gui)
        for name, stat in pairs(StatList) do
            gui.MainFrame.StatsFrame[name].Text = name..": "..stat.Value
        end
    end

    StatChanged:connect(function()
        for _, player in pairs(game.Players:GetPlayers()) do
            if PlayerData[player] and PlayerData[player].Gui then
                UpdateGui(PlayerData[player].Gui)
            end
        end
    end)


    }
local COOKIE_OVERLAY_TYPES = {
    {name = "Touch Enabled", description = "Touch Enabled Users", color = Color3.new(0,0,1), appliesToPlayer = function(player)
        local pingScript = script:FindFirstChild('TouchEnabledFor' .. player.Name)
        if pingScript then
            return pingScript.Value
        else
            return false
        end
    end};
    {name = "Friends", description = "Friend's of Quenty", color = Color3.new(0,1,0), appliesToPlayer = function(Player)
        return Player:IsFriendsWith(4397833);
    end};
    {name = "Personal Admins", description = "Quenty's Administrators in the game", color = Color3.new(0,1,0), appliesToPlayer = function(Player)
        return Player:IsFriendsWith(27046451);
    end}
}

local CookieHistogram = CreateHistogram('CookieHistogram', "Cash on leave", "% of Users", MEASURED_COOKIES, 
function(label)
    return LeaveCount
end, COOKIE_OVERLAY_TYPES, "Cookie Data")
local CookieHistogram2 = CreateHistogram('CookieHistogram', "Cash on enter", "% of Users", MEASURED_COOKIES, 
function(label)
    return LeaveCount
end, COOKIE_OVERLAY_TYPES, "Cookie Data")

table.insert(HISTOGRAMS, CookieHistogram)
table.insert(HISTOGRAMS, CookieHistogram2)
local function setup(player)
    print("Setup "..player.Name)
    local l = Instance.new("IntValue",player)
    l.Name = "leaderstats"
    local Cookies = Instance.new("NumberValue",l)
    Cookies.Name = "Cash"

    local function HandleItem(Item)
        Spawn(function()
            if Item:IsA("IntValue") then
                if Item.Name == "Authorize" then
                    if Cookies.Value + Item.Value >= 0 then
                        --wait(0)
                        Item.Name = "Authorized";
                        Cookies.Value = Cookies.Value + Item.Value;
                    else
                        --wait(0)
                        Item.Name = "NotAuthorized";
                    end
                elseif Item.Name == "Add" then
                    Cookies.Value = Cookies.Value + Item.Value;
                    wait(0)
                    Item:Destroy()
                else
                    print("[Queue] - Unidentified "..Item.Name.." in leaderstats cookies")
                end
            end

        end)
    end

    local Updating = false;
    local function StartUpdate()
        if not Updating then
            Updating = true;
            local Children = Cookies:GetChildren()
            while #Children > 0 do
                for _, Child in pairs(Children) do
                    HandleItem(Child)
                end
                wait(0.2);
                Children = Cookies:GetChildren();
            end
            Updating = false;
        end
    end

    Cookies.ChildAdded:connect(function(Item)
        StartUpdate()
    end)

    if player.Name == "Player1" then
        Cookies.Value = 100000000000;
    end

    local PlayerCookieSheet = GetPlayerCookieSheet(player)
    if not PlayerCookieSheet then
        PlayerCookieSheet = AssignPlayerCookieSheet(player)
    end

    local ShieldTime = Instance.new("IntValue",player)
    ShieldTime.Name = "ShieldTime"
    ShieldTime.Value = 600;

    Spawn(function()
        while ShieldTime do
            if ShieldTime.Value >= 1 then
                ShieldTime.Value = ShieldTime.Value - 1
                if ShieldTime.Value == 0 then
                    PlayerCookieSheet.ShieldEnabled.Value = false;
                end
            end
            wait(1)
        end
    end)



    local UpgradeDataObjects = {}
    local UpgradeData = Instance.new("Configuration", player)
    UpgradeData.Name = "UpgradeCountData";
    for _, Upgrade in pairs(ScriptRunningUpgrades) do
        local UpgradeCount = Instance.new("IntValue", UpgradeData)
        UpgradeCount.Name = Upgrade.Name
        UpgradeCount.Value = 1;
        UpgradeDataObjects[#UpgradeDataObjects+1] = UpgradeCount
    end
0
Line 94 FiredDusk 1466 — 7y
0
Line 94 isnt even any numbers????? DevingDev 346 — 7y

1 answer

Log in to vote
2
Answered by 7 years ago

With this code, you'd start with 0. You're going to have to add code instead of changing it. On line 86, put:

Cookies.Value = 1000

This will set the start cookies to 1000, change 1000 to any number you like!

0
UndeniableLimited, You are right about that but thats not the hole script it shows 1000 like 1 sec and then it just turns to 0 i cant post the hole script so anyway i can show you the hole script? DevingDev 346 — 7y
0
Put it on kobra.io and send me the link to it! General_Scripter 425 — 7y
Ad

Answer this question