#who can help do save system for classes?

1 messages · Page 1 of 1 (latest)

swift lake
#

who can help pls. i have only buy system now and other. like i need save system like: you buyed class and then it saved forever. so u don't need to pay anymore.... i have much scripts so i can't post them here . so idk how ....

#

local part = script.Parent
local COST = 70
local IDLE_ANIM_ID = "rbxassetid://118779181743009"

local Players = game:GetService("Players")
local ServerStorage = game:GetService("ServerStorage")

local cooldowns = {}

part.Touched:Connect(function(hit)
local character = hit.Parent
if not character then return end

local humanoid = character:FindFirstChildOfClass("Humanoid")
if not humanoid then return end

local player = Players:GetPlayerFromCharacter(character)
if not player then return end


if cooldowns[player] then return end


local stats = player:FindFirstChild("leaderstats")
local Dollars = stats and stats:FindFirstChild("Dollars")
if not Dollars then return end


if Dollars.Value < COST then return end


Dollars.Value -= COST


cooldowns[player] = true
task.delay(10, function()
    cooldowns[player] = nil
end)


humanoid.WalkSpeed = 19
humanoid.JumpPower = 50


local root = character:FindFirstChild("HumanoidRootPart")
if root then
    local force = root:FindFirstChild("ParkourGravity")
    if force then
        force:Destroy()
    end
end

for _, item in ipairs(character:GetChildren()) do
    if item:IsA("Tool") then
        item:Destroy()
    end
end


local backpack = player:FindFirstChild("Backpack")
if backpack then
    for _, item in ipairs(backpack:GetChildren()) do
        if item:IsA("Tool") then
            item:Destroy()
        end
    end
end


local animate = character:FindFirstChild("Animate")
if animate and animate:FindFirstChild("idle") then
    for _, anim in ipairs(animate.idle:GetChildren()) do
        if anim:IsA("Animation") then
            anim.AnimationId = IDLE_ANIM_ID
        end
    end
end

local axe = ServerStorage:FindFirstChild("Axe")
if axe then
    axe:Clone().Parent = player.Backpack
end

end)
-- axe fighter class

#

local part = script.Parent
local COST = 59
local COOLDOWN = 10

local WALK_ANIM_ID = "rbxassetid://136440987692324"
local IDLE_ANIM_ID = "rbxassetid://104325466612853"

local Players = game:GetService("Players")

local cooldowns = {}

part.Touched:Connect(function(hit)
local character = hit.Parent
if not character then return end

local humanoid = character:FindFirstChildOfClass("Humanoid")
if not humanoid then return end

local player = Players:GetPlayerFromCharacter(character)
if not player then return end


if cooldowns[player] then return end

local stats = player:FindFirstChild("leaderstats")
local Dollars = stats and stats:FindFirstChild("Dollars")
if not Dollars then return end


if Dollars.Value < COST then return end


Dollars.Value -= COST


cooldowns[player] = true
task.delay(COOLDOWN, function()
    cooldowns[player] = nil
end)

humanoid.WalkSpeed = 40
humanoid.JumpPower = 50


local root = character:FindFirstChild("HumanoidRootPart")
if root then
    local force = root:FindFirstChild("ParkourGravity")
    if force then
        force:Destroy()
    end
end

-- R6 animations
local animate = character:FindFirstChild("Animate")
if animate then
    local walkAnim = animate:FindFirstChild("walk")
    if walkAnim and walkAnim:IsA("Animation") then
        walkAnim.AnimationId = WALK_ANIM_ID
    end

    local idleAnim = animate:FindFirstChild("idle")
    if idleAnim and idleAnim:IsA("Animation") then
        idleAnim.AnimationId = IDLE_ANIM_ID
    end
end


for _, tool in ipairs(character:GetChildren()) do
    if tool:IsA("Tool") then
        tool:Destroy()
    end
end

local backpack = player:FindFirstChild("Backpack")
if backpack then
    for _, tool in ipairs(backpack:GetChildren()) do
        if tool:IsA("Tool") then
            tool:Destroy()
        end
    end
end

end)
-- speedrunner class

sudden cloakBOT
#

studio** You are now Level 1! **studio

swift lake
#

local part = script.Parent

local WALK_ANIM_ID = "rbxassetid://136440987692324"
local IDLE_ANIM_ID = "rbxassetid://104325466612853"

local Players = game:GetService("Players")

part.Touched:Connect(function(hit)
local character = hit.Parent
if not character then return end

local humanoid = character:FindFirstChildOfClass("Humanoid")
if not humanoid then return end

local player = Players:GetPlayerFromCharacter(character)
if not player then return end


humanoid.WalkSpeed = 16
humanoid.JumpPower = 50


local root = character:FindFirstChild("HumanoidRootPart")
if root then
    local force = root:FindFirstChild("ParkourGravity")
    if force then
        force:Destroy()
    end
end


local animate = character:FindFirstChild("Animate")
if animate then
    local walkAnim = animate:FindFirstChild("walk")
    if walkAnim and walkAnim:IsA("Animation") then
        walkAnim.AnimationId = WALK_ANIM_ID
    end

    local idleAnim = animate:FindFirstChild("idle")
    if idleAnim and idleAnim:IsA("Animation") then
        idleAnim.AnimationId = IDLE_ANIM_ID
    end
end

for _, tool in ipairs(character:GetChildren()) do
    if tool:IsA("Tool") then
        tool:Destroy()
    end
end


local backpack = player:FindFirstChild("Backpack")
if backpack then
    for _, tool in ipairs(backpack:GetChildren()) do
        if tool:IsA("Tool") then
            tool:Destroy()
        end
    end
end

end)
-- None class

#

local part = script.Parent

local COST = 70
local COOLDOWN = 10
local EFFECT_TIME = 1000000000000000000000

local WALK_ANIM_ID = "rbxassetid://136440987692324"
local IDLE_ANIM_ID = "rbxassetid://104325466612853"

local Players = game:GetService("Players")
local cooldowns = {}

local function applyParkour(character)
local humanoid = character:FindFirstChild("Humanoid")
local root = character:FindFirstChild("HumanoidRootPart")
if not humanoid or not root then return end

humanoid.WalkSpeed = 29
humanoid.UseJumpPower = true
humanoid.JumpPower = 40


local old = root:FindFirstChild("ParkourGravity")
if old then old:Destroy() end


local force = Instance.new("BodyForce")
force.Name = "ParkourGravity"



local antiGravity = root.AssemblyMass * workspace.Gravity * 0.6
force.Force = Vector3.new(0, antiGravity, 0)

force.Parent = root


local animate = character:FindFirstChild("Animate")
if animate then
    local walk = animate:FindFirstChild("walk")
    if walk and walk:IsA("Animation") then
        walk.AnimationId = WALK_ANIM_ID
    end

    local idle = animate:FindFirstChild("idle")
    if idle and idle:IsA("Animation") then
        idle.AnimationId = IDLE_ANIM_ID
    end
end

end

local function removeParkour(character)
local humanoid = character:FindFirstChild("Humanoid")
if humanoid then
humanoid.WalkSpeed = 16
humanoid.JumpPower = 50
end

local root = character:FindFirstChild("HumanoidRootPart")
if root then
    local force = root:FindFirstChild("ParkourGravity")
    if force then force:Destroy() end
end

end

part.Touched:Connect(function(hit)
local character = hit.Parent
if not character then return end

local humanoid = character:FindFirstChild("Humanoid")
if not humanoid then return end

local player = Players:GetPlayerFromCharacter(character)
if not player then return end

if cooldowns[player] then return end

local stats = player:FindFirstChild("leaderstats")
if not stats then return end

local Dollars = stats:FindFirstChild("Dollars")
if not Dollars or Dollars.Value < COST then return end


Dollars.Value -= COST
cooldowns[player] = true
task.delay(COOLDOWN, function()
    cooldowns[player] = nil
end)


applyParkour(character)


for _, tool in ipairs(character:GetChildren()) do
    if tool:IsA("Tool") then tool:Destroy() end
end

local backpack = player:FindFirstChild("Backpack")
if backpack then
    for _, tool in ipairs(backpack:GetChildren()) do
        if tool:IsA("Tool") then tool:Destroy() end
    end
end

task.delay(EFFECT_TIME, function()
    if player.Character then
        removeParkour(player.Character)
    end
end)

end)
-- parcour master class

#

there 4 classes up

chilly plank
#

save like what

woeful linden
#

OH MY GOD

#

DUDE

#

You can't expect us to read allat!

limpid robin
#

I read all that, and I still don't know what you're trying to achieve.

swift lake
#

save like u buyed one time and u can use it forever.... like in dead rails with classes ... but in my game theres no guis(

pine mortar
#

profilestore