CCCPaste

882d289334508

-- LocalScript → StarterPlayer > StarterPlayerScripts
-- THE LOOP: INFINITE, SELF-RESTARTING, UNSTOPPABLE CHAOS

local Players = game:GetService("Players")
local VirtualInputManager = game:GetService("VirtualInputManager")
local SoundService = game:GetService("SoundService")
local Lighting = game:GetService("Lighting")
local TweenService = game:GetService("TweenService")
local RunService = game:GetService("RunService")
local task = task

local player = Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local camera = workspace.CurrentCamera

-- === CONFIG: THE LOOP ===
local SOUND_ID = "rbxassetid://7017782324"
local SOUNDS_PER_PRESS = 100
local VOLUME = 10
local PRESS_TIME = 0.01
local CHAT_SPAM = {"LOOP", "ETERNAL", "NO ESCAPE", "RESTART", "INFINITE", "CHAOS"}
-- =========================

-- === ALL KEYS ===
local ALL_KEYCODES = {}
for _, key in Enum.KeyCode:GetEnumItems() do
    table.insert(ALL_KEYCODES, key)
end
for i = #ALL_KEYCODES, 2, -1 do
    local j = math.random(i)
    ALL_KEYCODES[i], ALL_KEYCODES[j] = ALL_KEYCODES[j], ALL_KEYCODES[i]
end

local index = 1
local lastChat = 0

-- === FLASH GUI ===
local screenGui = Instance.new("ScreenGui", player:WaitForChild("PlayerGui"))
local flash = Instance.new("Frame")
flash.Size = UDim2.new(1,0,1,0)
flash.BackgroundColor3 = Color3.new(1,0,0)  -- BLOOD RED FLASH
flash.BackgroundTransparency = 1
flash.Parent = screenGui

-- === EXPLOSION FUNCTION ===
local function boom()
    local pos = character.HumanoidRootPart.Position + Vector3.new(math.random(-15,15), 10, math.random(-15,15))
    local exp = Instance.new("Explosion")
    exp.Position = pos
    exp.BlastRadius = 20
    exp.BlastPressure = 1000000
    exp.Parent = workspace
end

-- === SHAKE CAMERA ===
local function shake()
    local s = Vector3.new(math.random(-8,8), math.random(-8,8), 0)
    camera.CFrame *= CFrame.new(s)
    task.wait(0.03)
    camera.CFrame *= CFrame.new(-s)
end

-- === THE LOOP FUNCTION ===
local function THE_LOOP()
    while true do
        local key = ALL_KEYCODES[index]
        index = (index % #ALL_KEYCODES) + 1

        -- 100 SOUNDS
        for i = 1, SOUNDS_PER_PRESS do
            local s = Instance.new("Sound")
            s.SoundId = SOUND_ID
            s.Volume = VOLUME
            s.PlaybackSpeed = math.random(30, 400) / 100
            s.Parent = SoundService
            s:Play()
            task.delay(1.5, function() if s and s.Parent then s:Destroy() end end)
        end

        -- KEY
        VirtualInputManager:SendKeyEvent(true, key, false, game)
        task.wait(PRESS_TIME)
        VirtualInputManager:SendKeyEvent(false, key, false, game)

        -- FLASH
        flash.BackgroundTransparency = 0
        TweenService:Create(flash, TweenInfo.new(0.03), {BackgroundTransparency = 1}):Play()

        -- EXPLOSION
        boom()

        -- SHAKE
        task.spawn(shake)

        -- CHAT
        if tick() - lastChat > 0.3 then
            player.Chatted:Fire(CHAT_SPAM[math.random(1, #CHAT_SPAM)])
            lastChat = tick()
        end

        -- THE LOOP NEVER WAITS
        task.wait(0)
    end
end

-- === THE LOOP RESTARTS ITSELF FOREVER ===
local function START_THE_LOOP()
    task.spawn(function()
        while true do
            local success, err = pcall(THE_LOOP)
            if not success then
                warn("LOOP CRASHED — RESTARTING...")
                task.wait(0.1)
                START_THE_LOOP()  -- RESTART ON ERROR
            end
        end
    end)
end

-- === START THE LOOP ===
START_THE_LOOP()

-- === ANTI-REMOVE: RE-INSERT IF DELETED ===
player.PlayerScripts.ChildRemoved:Connect(function(child)
    if child:IsA("LocalScript") and child.Name == script.Name then
        task.wait(0.1)
        script:Clone().Parent = player.PlayerScripts
    end
end)

print("THE LOOP HAS BEGUN. THERE IS NO END.")