Survive the killer Gui
Key Required

Survive the killer Gui

🔪Survive the Killer!OnlyThePowerOnlyThePower 14K views 11.7K executesUpdated Sep 17, 2025
1.0/ 5(5 votes)
1420% Positive
Lua Script•375 lines (14157 chars)
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local TweenService = game:GetService("TweenService")
local player = Players.LocalPlayer

local DETECT_DISTANCE = 25
local noclipEnabled = false
local espEnabled = false
local minimized = false
local blacklist = {}
local mapInvisible = false
local originalTransparency = {}
local mainFrameInitialPosition = UDim2.new(0.5, -110, 0.5, -100)

local function makeDraggable(guiObj)
    local dragging, dragInput, dragStart, startPos
    guiObj.InputBegan:Connect(function(input)
        if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
            dragging = true
            dragStart = input.Position
            startPos = guiObj.Position
            input.Changed:Connect(function()
                if input.UserInputState == Enum.UserInputState.End then
                    dragging = false
                end
            end)
        end
    end)
    guiObj.InputChanged:Connect(function(input)
        if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then
            dragInput = input
        end
    end)
    RunService.Heartbeat:Connect(function()
        if dragging and dragInput then
            local delta = dragInput.Position - dragStart
            guiObj.Position = UDim2.new(
                startPos.X.Scale, startPos.X.Offset + delta.X,
                startPos.Y.Scale, startPos.Y.Offset + delta.Y
            )
        end
    end)
end

local screenGui = Instance.new("ScreenGui")
screenGui.Name = "STKMenuV13"
screenGui.ResetOnSpawn = false
screenGui.Parent = player:WaitForChild("PlayerGui")

local openBtn = Instance.new("TextButton", screenGui)
openBtn.Size = UDim2.new(0, 35, 0, 35)
openBtn.Position = UDim2.new(0, 10, 0.5, -17)
openBtn.Text = "≡"
openBtn.Font = Enum.Font.SourceSansBold
openBtn.TextSize = 24
openBtn.BackgroundColor3 = Color3.fromRGB(40,40,40)
openBtn.TextColor3 = Color3.fromRGB(255,255,255)
Instance.new("UICorner", openBtn).CornerRadius = UDim.new(1,0)
makeDraggable(openBtn)

local mainFrame = Instance.new("Frame", screenGui)
mainFrame.Size = UDim2.new(0, 220, 0, 200)
mainFrame.Position = mainFrameInitialPosition
mainFrame.BackgroundColor3 = Color3.fromRGB(35,35,35)
mainFrame.Visible = false
Instance.new("UICorner", mainFrame).CornerRadius = UDim.new(0,12)
makeDraggable(mainFrame)

local titleBar = Instance.new("Frame", mainFrame)
titleBar.Size = UDim2.new(1, 0, 0, 25)
titleBar.BackgroundColor3 = Color3.fromRGB(25,25,25)
Instance.new("UICorner", titleBar).CornerRadius = UDim.new(0,12)

local title = Instance.new("TextLabel", titleBar)
title.Size = UDim2.new(1, -50, 1, 0)
title.Position = UDim2.new(0, 5, 0, 0)
title.BackgroundTransparency = 1
title.Text = "STK Menu"
title.Font = Enum.Font.SourceSansBold
title.TextSize = 16
title.TextColor3 = Color3.fromRGB(255,255,255)
title.TextXAlignment = Enum.TextXAlignment.Left

local closeBtn = Instance.new("TextButton", titleBar)
closeBtn.Size = UDim2.new(0, 25, 0, 20)
closeBtn.Position = UDim2.new(1, -30, 0.5, -10)
closeBtn.Text = "X"
closeBtn.Font = Enum.Font.SourceSansBold
closeBtn.TextSize = 16
closeBtn.BackgroundColor3 = Color3.fromRGB(120,40,40)
closeBtn.TextColor3 = Color3.fromRGB(255,255,255)
Instance.new("UICorner", closeBtn).CornerRadius = UDim.new(0,6)

local miniBtn = Instance.new("TextButton", titleBar)
miniBtn.Size = UDim2.new(0, 25, 0, 20)
miniBtn.Position = UDim2.new(1, -60, 0.5, -10)
miniBtn.Text = "_"
miniBtn.Font = Enum.Font.SourceSansBold
miniBtn.TextSize = 16
miniBtn.BackgroundColor3 = Color3.fromRGB(60,60,120)
miniBtn.TextColor3 = Color3.fromRGB(255,255,255)
Instance.new("UICorner", miniBtn).CornerRadius = UDim.new(0,6)

local scroll = Instance.new("ScrollingFrame", mainFrame)
scroll.Size = UDim2.new(1, -10, 1, -25)
scroll.Position = UDim2.new(0, 5, 0, 25)
scroll.BackgroundColor3 = Color3.fromRGB(45,45,45)
scroll.ScrollBarThickness = 5
scroll.CanvasSize = UDim2.new(0,0,0,500)
Instance.new("UICorner", scroll).CornerRadius = UDim.new(0,8)

local UIList = Instance.new("UIListLayout", scroll)
UIList.Padding = UDim.new(0,4)
UIList.HorizontalAlignment = Enum.HorizontalAlignment.Center
UIList.SortOrder = Enum.SortOrder.LayoutOrder

local nameBox = Instance.new("TextBox", scroll)
nameBox.Size = UDim2.new(1, -10, 0, 30)
nameBox.PlaceholderText = "Player name..."
nameBox.BackgroundColor3 = Color3.fromRGB(60,60,60)
nameBox.Text = ""
nameBox.Font = Enum.Font.SourceSans
nameBox.TextSize = 14
nameBox.TextColor3 = Color3.fromRGB(255,255,255)
Instance.new("UICorner", nameBox).CornerRadius = UDim.new(0,6)

local blacklistBox = Instance.new("TextBox", scroll)
blacklistBox.Size = UDim2.new(1, -10, 0, 30)
blacklistBox.PlaceholderText = "Blacklist (abbreviation)..."
blacklistBox.BackgroundColor3 = Color3.fromRGB(80,50,50)
blacklistBox.Text = ""
blacklistBox.Font = Enum.Font.SourceSans
blacklistBox.TextSize = 14
blacklistBox.TextColor3 = Color3.fromRGB(255,255,255)
Instance.new("UICorner", blacklistBox).CornerRadius = UDim.new(0,6)

local function makeButton(txt, color)
    local btn = Instance.new("TextButton")
    btn.Size = UDim2.new(1, -10, 0, 30)
    btn.Text = txt
    btn.Font = Enum.Font.SourceSansBold
    btn.TextSize = 14
    btn.BackgroundColor3 = color
    btn.TextColor3 = Color3.fromRGB(255,255,255)
    Instance.new("UICorner", btn).CornerRadius = UDim.new(0,6)
    btn.Parent = scroll
    return btn
end

local stopBtn = makeButton("Stop", Color3.fromRGB(170,60,60))
local espBtn = makeButton("ESP Toggle", Color3.fromRGB(180,120,40))
local tpRandomBtn = makeButton("Teleport Random", Color3.fromRGB(200,100,50))
local tpNameBtn = makeButton("Teleport to Player", Color3.fromRGB(200,60,90))
local noclipBtn = makeButton("Noclip Toggle", Color3.fromRGB(100,180,180))
local addBlacklistBtn = makeButton("Add Blacklist", Color3.fromRGB(150,60,60))
local invisibleMapBtn = makeButton("Invisible Map", Color3.fromRGB(80,120,160))
local toLobbyBtn = makeButton("To Lobby", Color3.fromRGB(70,150,70))
local speedBtn = makeButton("Speed 30", Color3.fromRGB(100,200,100))

local statusLabel = Instance.new("TextLabel", scroll)
statusLabel.Size = UDim2.new(1, -10, 0, 20)
statusLabel.Text = "Status: idle"
statusLabel.Font = Enum.Font.SourceSans
statusLabel.TextSize = 12
statusLabel.BackgroundTransparency = 1
statusLabel.TextColor3 = Color3.fromRGB(200,200,200)

-- GUI Open / Close / Minimize
openBtn.MouseButton1Click:Connect(function()
    if not mainFrame.Visible then
        mainFrame.Position = mainFrameInitialPosition
        mainFrame.Visible = true
        mainFrame.Size = UDim2.new(0, 0, 0, 0)
        TweenService:Create(mainFrame, TweenInfo.new(0.3, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {
            Size = UDim2.new(0, 220, 0, 200)
        }):Play()
        minimized = false
    end
end)
closeBtn.MouseButton1Click:Connect(function() mainFrame.Visible = false end)
miniBtn.MouseButton1Click:Connect(function()
    if minimized then
        TweenService:Create(mainFrame, TweenInfo.new(0.25, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {
            Size = UDim2.new(0, 220, 0, 200)
        }):Play()
        minimized = false
    else
        TweenService:Create(mainFrame, TweenInfo.new(0.25, Enum.EasingStyle.Quad, Enum.EasingDirection.In), {
            Size = UDim2.new(0, 220, 0, 25)
        }):Play()
        minimized = true
    end
end)

-- Helper Functions
local function isBlacklisted(plr)
    local lowerName = string.lower(plr.Name)
    for _, blk in ipairs(blacklist) do
        if string.find(lowerName, string.lower(blk), 1, true) then
            return true
        end
    end
    return false
end

local function findPlayerByPartial(text)
    local lower = string.lower(text)
    if lower == "" then return nil end
    for _, pl in ipairs(Players:GetPlayers()) do
        if pl ~= player and string.find(string.lower(pl.Name), lower, 1, true) then
            if not isBlacklisted(pl) then
                return pl
            end
        end
    end
end

local function pickRandomPlayer()
    local list = {}
    for _, pl in ipairs(Players:GetPlayers()) do
        if pl ~= player and not isBlacklisted(pl) then
            table.insert(list, pl)
        end
    end
    if #list > 0 then return list[math.random(1,#list)] end
end

local function safeTeleport(target)
    if target and not isBlacklisted(target) and target.Character and target.Character:FindFirstChild("HumanoidRootPart") then
        local myRoot = player.Character and player.Character:FindFirstChild("HumanoidRootPart")
        local targetRoot = target.Character:FindFirstChild("HumanoidRootPart")
        if myRoot and targetRoot then
            myRoot.CFrame = targetRoot.CFrame + Vector3.new(2,0,0)
            statusLabel.Text = "Teleported to "..target.Name
        end
    else
        statusLabel.Text = "Cannot teleport to target (blacklisted or missing)"
    end
end

-- Button Functions
stopBtn.MouseButton1Click:Connect(function() statusLabel.Text = "Status: idle" end)
tpRandomBtn.MouseButton1Click:Connect(function() safeTeleport(pickRandomPlayer()) end)
tpNameBtn.MouseButton1Click:Connect(function() safeTeleport(findPlayerByPartial(nameBox.Text)) end)
addBlacklistBtn.MouseButton1Click:Connect(function()
    local text = blacklistBox.Text
    if text ~= "" then
        table.insert(blacklist, text)
        statusLabel.Text = "Added to blacklist: "..text
        blacklistBox.Text = ""
    end
end)
noclipBtn.MouseButton1Click:Connect(function()
    noclipEnabled = not noclipEnabled
    statusLabel.Text = "Noclip: "..tostring(noclipEnabled)
end)
invisibleMapBtn.MouseButton1Click:Connect(function()
    mapInvisible = not mapInvisible
    if mapInvisible then
        for _, part in ipairs(workspace:GetDescendants()) do
            if part:IsA("BasePart") and not part:IsDescendantOf(player.Character) then
                local isPlayerPart = false
                for _, plr in ipairs(Players:GetPlayers()) do
                    if plr.Character and part:IsDescendantOf(plr.Character) then
                        isPlayerPart = true
                        break
                    end
                end
                if not isPlayerPart then
                    originalTransparency[part] = part.Transparency
                    part.Transparency = 1
                end
            end
        end
        statusLabel.Text = "Map Invisible ON"
    else
        for part, trans in pairs(originalTransparency) do
            if part and part.Parent then
                part.Transparency = trans
            end
        end
        originalTransparency = {}
        statusLabel.Text = "Map Invisible OFF"
    end
end)

toLobbyBtn.MouseButton1Click:Connect(function()
    if player.Character and player.Character:FindFirstChild("HumanoidRootPart") then
        player.Character.HumanoidRootPart.CFrame = CFrame.new(-9.22, 267.96, -5.39)
        statusLabel.Text = "Teleported to Lobby"
    end
end)

speedBtn.MouseButton1Click:Connect(function()
    if player.Character and player.Character:FindFirstChild("Humanoid") then
        player.Character.Humanoid.WalkSpeed = 30
        statusLabel.Text = "Speed set to 30"
    end
end)

-- Noclip
RunService.Stepped:Connect(function()
    if noclipEnabled and player.Character then
        for _, part in ipairs(player.Character:GetDescendants()) do
            if part:IsA("BasePart") then
                part.CanCollide = false
            end
        end
    end
end)

-- ESP
local highlights = {}
local nameTags = {}
espBtn.MouseButton1Click:Connect(function()
    espEnabled = not espEnabled
    if espEnabled then
        for _, pl in ipairs(Players:GetPlayers()) do
            if pl ~= player and pl.Character and not isBlacklisted(pl) then
                local hl = Instance.new("Highlight")
                hl.FillColor = Color3.fromRGB(255,255,0)
                hl.OutlineColor = Color3.fromRGB(255,255,255)
                hl.Parent = pl.Character
                highlights[pl] = hl

                local bill = Instance.new("BillboardGui")
                bill.Name = "NameESP"
                bill.Size = UDim2.new(0,100,0,50)
                bill.Adornee = pl.Character:FindFirstChild("HumanoidRootPart")
                bill.AlwaysOnTop = true
                local label = Instance.new("TextLabel", bill)
                label.Size = UDim2.new(1,0,1,0)
                label.BackgroundTransparency = 1
                label.TextColor3 = Color3.fromRGB(255,255,0)
                label.TextStrokeColor3 = Color3.fromRGB(0,0,0)
                label.TextStrokeTransparency = 0
                label.Font = Enum.Font.SourceSansBold
                label.TextSize = 14
                label.Text = pl.Name
                nameTags[pl] = bill
                bill.Parent = player.PlayerGui
            end
        end
        statusLabel.Text = "ESP ON"
    else
        for _, hl in pairs(highlights) do if hl then hl:Destroy() end end
        highlights = {}
        for _, bill in pairs(nameTags) do if bill then bill:Destroy() end end
        nameTags = {}
        statusLabel.Text = "ESP OFF"
    end
end)

-- Auto teleport jika didekat blacklist
RunService.Heartbeat:Connect(function()
    if player.Character and player.Character:FindFirstChild("HumanoidRootPart") then
        local myRoot = player.Character.HumanoidRootPart
        for _, pl in ipairs(Players:GetPlayers()) do
            if pl ~= player and pl.Character and pl.Character:FindFirstChild("HumanoidRootPart") then
                if isBlacklisted(pl) then
                    local distance = (myRoot.Position - pl.Character.HumanoidRootPart.Position).Magnitude
                    if distance <= DETECT_DISTANCE then
                        safeTeleport(pickRandomPlayer())
                        break
                    end
                end
            end
        end
    end
end)

Players.PlayerRemoving:Connect(function(plr)
    if highlights[plr] then highlights[plr]:Destroy() highlights[plr]=nil end
    if nameTags[plr] then nameTags[plr]:Destroy() nameTags[plr]=nil end
end)

Features & Information

The use in survival of the Killer can also be in other games
#Stk

Community Comments (0)

No comments yet for this script.

More Scripts for 🔪Survive the Killer!