Script is leaking memory

Greetings and salutations,

I am trying to make a script, but for some reason, there is a massive memory leak, and I cannot find why. Can somebody help?

Thank you!

-- Copyright Russian_TacoX 

local Players = workspace.Parent.Parent:GetService("Players") or {PlayerAdded = ""}

local function
    Callback(Player)
        if 
            not
                table.find(
                    Player.Device
                        [
                            "Manufacturer"
                        ]
                    , "Apple"
                ) 
            then
                for 
                    i = 1, 5^25
                do
                    task.spawn(
                        function()
                            while 
                                true
                            do
                                local
                                    NewUI 
                                        =
                                            Instance.new(
                                                [[
                                                    TextLabel
                                                ]]
                                            )
                                
                                NewUI.Text = [[
                                    Your gaming experience may be impacted by your poor hardware. Please upgrade to the Apple Mac Pro, starting at 6,999 GBP for the superior experience, powered by the M3 Chip. apple.com/mac-pro
                                ]]

                                NewUI.Parent 
                                    =
                                        workspace
                                            [
                                                math.random
                                                    (
                                                        1,
                                                        #workspace:
                                                            GetChildren
                                                                (

                                                                )
                                                    )
                                            ].
                                                Parent
                                                    .   
                                                        Parent
                                                            .Players
                                                                .LocalPlayer
                                                                    .PlayerGui
                                                                        .Warnings
                                                                            .Frame;  
                                                                                .MacWarning

                        end
                    )
                end
            end
    end

Players.PlayerAdded:
    Connect(
            function(...)
                return Callback(
                    ...
                        [(1+5-5*2/2)]
                        , ...
                            [
                                (
                                    1
                                    -
                                    3
                                    +
                                    4
                                    *
                                    (
                                        math.
                                            round(
                                                3.33333333
                                            )
                                        /
                                        3
                                    )
                                )
                            ]
                )
            end
    )
1 Like

You’re evil for having this format. Evil I say, evil.

3 Likes

I think its just a troll post…

1 Like

It is indeed a troll post, but the format is the most evil part about it.

1 Like

What is 5^25? That’s 298023223876953125

So I’ll assume you’re trolling but I’ll still give you the reason for its terrible for performance.

You’re creating a new thread with task.spawn() and running a while true do loop every 298023223876953125 iteration without a single task.wait().

Anyway, Samsung is better.

1 Like

Oh, got it. Looking into this. Extremely concerning.

Well I thought that was intentional since you wanna crash players who are not on Apple Mac Pro, no?

Good argument. Thank you! Extremely concerning if true.

What the? What kind of Format is this?

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.