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

I need help with a sell,backpack,and shovel script. Thanks ?

Asked by 6 years ago

I want to learn how to make a snow shovel script and backpack, almost like bee swarm sim or snow shoveling sim, but this game will be private for my friends. This is the code I got:

local waitdur = 1.2 playing = false local leaderstats = game.Players.LocalPlayer:WaitForChild("leaderstats")

script.Parent.Activated:connect(function() local attack = script.Parent.Parent.Humanoid:LoadAnimation(script.Shoveled) wait() if playing == false then playing = true attack:Play() wait(waitdur) playing = false attack:Stop() end end)

script.Parent.takeawaypart.Touched:connect(function(part) if playing == false then elseif playing == true then if part.Name == "snowpiece" and part.Digsleft.Value == 3 then part.Digsleft.Parent.Size = Vector3.new(4, 1.5, 4) wait(1) part.Digsleft.Value = 2

        elseif part.Name == "snowpiece" and part.Digsleft.Value == 2 then
        part.Digsleft.Parent.Size = Vector3.new(4, 1, 4)
        wait(1)
        part.Digsleft.Value = 1


        elseif part.Name == "snowpiece" and part.Digsleft.Value == 1 then
        part.Digsleft.Parent.Size = Vector3.new(4, .5, 4)
        wait(1)
        part.Digsleft.Value = 0

        elseif part.Name == "snowpiece" and part.Digsleft.Value == 0 then
        part.Digsleft.Parent.Size = Vector3.new(4, 0, 4)
        wait(1)
        part.Digsleft.Value = -1
    end


end

end)

but I can't figure out how to make a backpack script or a basic "Sell snow at Frosty!" script. Someone please help.

(sorry for asking for scripts)

0
Just play the carbon copy games from that game. treasure hunt simulator, woodcutting simulator, snow shoveling simulator, ghost hunt simulator, the list goes on and on. Omega677 15 — 6y
0
Please put all of your code in a code block Filipalla 504 — 6y
0
Bump Ignited_Spark -5 — 6y

1 answer

Log in to vote
0
Answered by
Filipalla 504 Moderation Voter
6 years ago
Edited 6 years ago

My personal approach to that problem would be to store the backpack snow in a constrained intvalue inside a folder in the player. For frosty you should make a hitbox with a clickdetector and put on a billboard gui make frosty check how much snow you have remove the snow and give you the money

This is just theory since it would be better if you made it yourself

If you need more help please let me know

Edit: IntConstrainedValue is deprecated but should be ok to use if it's just for friends

Ad

Answer this question