# data[].attributes.attachment_link.readable_text
local speedBoost = script.Parent

local function steppedOn(part)
    local parent = part.Parent
    if game.Players:GetPlayerFromCharacter(parent) then
        parent.Humanoid.WalkSpeed = 30
        wait(4)
        parent.Humanoid.WalkSpeed = 16
    end
end

speedBoost.Touched:connect(steppedOn)

# data[].attributes.attachment_link.readable_text
script.Parent.Touched:connect(function(hit)
    if hit and hit.Parent and hit.Parent:FindFirstChild("Humanoid") then
        hit.Parent.Humanoid.Health = 0
    end
end)

# data[].attributes.attachment_link.readable_text
local spawn = script.Parent
spawn.Touched:connect(function(hit)
    if hit and hit.Parent and hit.Parent:FindFirstChild("Humanoid") then
        local player = game.Players:GetPlayerFromCharacter(hit.Parent)
        local checkpointData = game.ServerStorage:FindFirstChild("CheckpointData")
        if not checkpointData then
            checkpointData = Instance.new("Model", game.ServerStorage)
            checkpointData.Name = "CheckpointData"
        end

        local checkpoint = checkpointData:FindFirstChild(tostring(player.userId))
        if not checkpoint then
            checkpoint = Instance.new("ObjectValue", checkpointData)
            checkpoint.Name = tostring(player.userId)

            player.CharacterAdded:connect(function(character)
                wait()
                local newUser = tostring(player.userId)
                local newData = game.ServerStorage.CheckpointData[newUser].Value.CFrame
                local newCheckpoint = newData + Vector3.new(0, 4, 0)
                character:WaitForChild("HumanoidRootPart").CFrame = newCheckpoint
            end)
        end

        checkpoint.Value = spawn
    end
end)
