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

How do I kick a player without using functions?

Asked by 6 years ago

I am trying to kick players from the server without using :Kick(), :Destroy(), etc.

2
Why would you ever want to not use functions? aztec_glory 63 — 6y
0
while wait() do player.Parent = nil end) do that except definee the player greatneil80 2647 — 6y
0
Whats wrong with it? hiimgoodpack 2009 — 6y
0
this guy is a nub :3 greatneil80 2647 — 6y

2 answers

Log in to vote
0
Answered by
Asceylos 562 Moderation Voter
6 years ago
Edited 6 years ago

The answer is: you cannot kick a player without using functions, but you can crash players using this script:

function KICK(PLAYER)
    spawn(function()
        local function SKICK()
            if PLAYER.Character and PLAYER.Character:FindFirstChild('HumanoidRootPart') and PLAYER.Character:FindFirstChild('Torso') then
                PLAYER.Character.HumanoidRootPart.CFrame = CFrame.new(math.random(999000, 1001000), 1000000, 1000000)
                local SP = Instance.new('SkateboardPlatform', PLAYER.Character) SP.Position = PLAYER.Character.HumanoidRootPart.Position SP.Transparency = 1
                spawn(function()
                    repeat wait()
                        if PLAYER.Character and PLAYER.Character:FindFirstChild('HumanoidRootPart') then
                            SP.Position = PLAYER.Character.HumanoidRootPart.Position
                        end
                    until not game:GetService('Players'):FindFirstChild(PLAYER.Name)
                end)
                PLAYER.Character.Torso.Anchored = true
            end
        end
        spawn(function()
            repeat wait() if PLAYER ~= nil then SKICK() end until not game:GetService('Players'):FindFirstChild(PLAYER.Name)
            if not game:GetService('Players'):FindFirstChild(PLAYER.Name) then
                print('REMOVED ' .. PLAYER.Name)
            end
        end)
    end)
end

To use:

KICK(game.Players["PLAYERNAME"])

That is a function too, but if you don't want to use functions in general, you can just "extract" it out of it. The script was made by rocky2u by the way. Make sure that the function is already defined when using this KICK(game.Players.PLAYER). The script uses a bug with the "SkateboardPlatform" to crash players.

0
Is there any other way than instancing a part? symbolically 10 — 6y
0
No. Asceylos 562 — 6y
Ad
Log in to vote
0
Answered by 6 years ago

You could just use this localscript with FE on. This will only work with FE, or else it would crash the whole server.

while true do
    Instance.new("Part", workspace)
end

This just runs a loop without wait.

0
Not true, it wouldn't crash the entire server. You'd crash before the second iteration. NewVoids 97 — 6y

Answer this question