local Players = game:GetService("Players") local UIS = game:GetService("UserInputService") local RunService = game:GetService("RunService") local ReplicatedStorage = game:GetService("ReplicatedStorage") local player = Players.LocalPlayer local remote = ReplicatedStorage:WaitForChild("CoolScriptRemote") local gui = Instance.new("ScreenGui") gui.Name = "CoolScript" gui.ResetOnSpawn = false gui.Parent = player:WaitForChild("PlayerGui") local flying = false local noclip = false local infiniteJump = false local selectedId = nil local flySpeed = 50 local flyUp = false local flyDown = false local oldCollision = {} local flyConnection local clipConnection local spectating = false local alertEnabled = false local function getHumanoid() local c = player.Character return c and c:FindFirstChildOfClass("Humanoid") end local function getRoot() local c = player.Character return c and c:FindFirstChild("HumanoidRootPart") end local function server(action, value) local ok, success, result = pcall(function() return remote:InvokeServer(action, value) end) if not ok then warn("Cool Script error:", success) return false end return success, result end local function make(class, props, parent) local obj = Instance.new(class) for k, v in pairs(props) do obj[k] = v end obj.Parent = parent return obj end -- Main window local main = make("Frame", { Size = UDim2.fromOffset(310, 440), Position = UDim2.new(0.5, -155, 0.5, -220), BackgroundColor3 = Color3.fromRGB(25, 25, 32), BorderSizePixel = 0 }, gui) make("UICorner", {CornerRadius = UDim.new(0, 12)}, main) local header = make("TextButton", { Size = UDim2.new(1, 0, 0, 42), BackgroundColor3 = Color3.fromRGB(185, 25, 35), Text = "COOL SCRIPT ×", TextColor3 = Color3.new(1, 1, 1), TextSize = 20, Font = Enum.Font.GothamBold }, main) local reopen = make("TextButton", { Size = UDim2.fromOffset(115, 38), Position = UDim2.fromOffset(10, 100), BackgroundColor3 = Color3.fromRGB(185, 25, 35), Text = "OPEN COOL SCRIPT", TextColor3 = Color3.new(1, 1, 1), TextSize = 13, Visible = false }, gui) header.MouseButton1Click:Connect(function() main.Visible = false reopen.Visible = true end) reopen.MouseButton1Click:Connect(function() main.Visible = true reopen.Visible = false end) -- Drag window with mouse or touch local dragging, dragStart, startPos header.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then dragging = true dragStart = input.Position startPos = main.Position end end) UIS.InputChanged:Connect(function(input) if dragging and (input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch) then local d = input.Position - dragStart main.Position = UDim2.new( startPos.X.Scale, startPos.X.Offset + d.X, startPos.Y.Scale, startPos.Y.Offset + d.Y ) end end) UIS.InputEnded:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then dragging = false end end) -- Scrolling content local scroll = make("ScrollingFrame", { Position = UDim2.fromOffset(8, 50), Size = UDim2.new(1, -16, 1, -58), BackgroundTransparency = 1, BorderSizePixel = 0, ScrollBarThickness = 6, AutomaticCanvasSize = Enum.AutomaticSize.Y, CanvasSize = UDim2.new() }, main) local layout = make("UIListLayout", { Padding = UDim.new(0, 6), SortOrder = Enum.SortOrder.LayoutOrder }, scroll) local function label(text) make("TextLabel", { Size = UDim2.new(1, -5, 0, 27), BackgroundTransparency = 1, Text = text, TextColor3 = Color3.fromRGB(255, 90, 90), TextSize = 16, Font = Enum.Font.GothamBold }, scroll) end local function button(text, callback) local b = make("TextButton", { Size = UDim2.new(1, -5, 0, 36), BackgroundColor3 = Color3.fromRGB(60, 60, 70), TextColor3 = Color3.new(1, 1, 1), Text = text, TextSize = 14, Font = Enum.Font.Gotham }, scroll) make("UICorner", {CornerRadius = UDim.new(0, 7)}, b) b.MouseButton1Click:Connect(callback) return b end -- Player Management label("PLAYER MANAGEMENT") local speedBox = make("TextBox", { Size = UDim2.new(1, -5, 0, 36), BackgroundColor3 = Color3.fromRGB(48, 48, 58), TextColor3 = Color3.new(1, 1, 1), PlaceholderText = "WalkSpeed (1 - 1000)", Text = "50", TextSize = 15, ClearTextOnFocus = false }, scroll) button("SET WALK SPEED", function() local speed = tonumber(speedBox.Text) if speed then local ok = server("Speed", speed) if not ok then warn("Could not set speed.") end end end) local flyButton local function setFly(on) flying = on if flyConnection then flyConnection:Disconnect() flyConnection = nil end if on then flyConnection = RunService.Heartbeat:Connect(function() local root = getRoot() local hum = getHumanoid() if not root or not hum then return end local vertical = 0 if flyUp then vertical = 1 end if flyDown then vertical = -1 end root.AssemblyLinearVelocity = hum.MoveDirection * flySpeed + Vector3.new(0, vertical * flySpeed, 0) end) else local root = getRoot() if root then root.AssemblyLinearVelocity = Vector3.zero end end flyButton.Text = "FLY: " .. (on and "ON" or "OFF") end flyButton = button("FLY: OFF", function() setFly(not flying) end) -- Mobile flight controls local flightControls = make("Frame", { Size = UDim2.fromOffset(130, 100), Position = UDim2.new(1, -145, 1, -120), BackgroundColor3 = Color3.fromRGB(35, 35, 45), Visible = false }, gui) make("UICorner", {CornerRadius = UDim.new(0, 8)}, flightControls) local upButton = make("TextButton", { Size = UDim2.fromOffset(55, 38), Position = UDim2.fromOffset(5, 5), Text = "UP", BackgroundColor3 = Color3.fromRGB(185, 25, 35), TextColor3 = Color3.new(1, 1, 1) }, flightControls) local downButton = make("TextButton", { Size = UDim2.fromOffset(55, 38), Position = UDim2.fromOffset(68, 5), Text = "DOWN", BackgroundColor3 = Color3.fromRGB(185, 25, 35), TextColor3 = Color3.new(1, 1, 1) }, flightControls) local function holdButton(b, setter) b.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.Touch or input.UserInputType == Enum.UserInputType.MouseButton1 then setter(true) end end) b.InputEnded:Connect(function(input) if input.UserInputType == Enum.UserInputType.Touch or input.UserInputType == Enum.UserInputType.MouseButton1 then setter(false) end end) end holdButton(upButton, function(v) flyUp = v end) holdButton(downButton, function(v) flyDown = v end) local oldSetFly = setFly flyButton.MouseButton1Click:Connect(function() flightControls.Visible = flying end) -- Noclip local clipButton local function setNoclip(on) noclip = on if clipConnection then clipConnection:Disconnect() clipConnection = nil end if on then clipConnection = RunService.Stepped:Connect(function() local c = player.Character if not c then return end for _, part in ipairs(c:GetDescendants()) do if part:IsA("BasePart") then if oldCollision[part] == nil then oldCollision[part] = part.CanCollide end part.CanCollide = false end end end) else for part, oldValue in pairs(oldCollision) do if part and part.Parent then part.CanCollide = oldValue end end table.clear(oldCollision) end clipButton.Text = "NOCLIP: " .. (on and "ON" or "OFF") end clipButton = button("NOCLIP: OFF", function() setNoclip(not noclip) end) -- Infinite jump local jumpButton jumpButton = button("INFINITE JUMP: OFF", function() infiniteJump = not infiniteJump jumpButton.Text = "INFINITE JUMP: " .. (infiniteJump and "ON" or "OFF") end) UIS.JumpRequest:Connect(function() if infiniteJump then local hum = getHumanoid() if hum then hum:ChangeState(Enum.HumanoidStateType.Jumping) end end end) -- TP GUI toggle label("TELEPORT GUI") local tpPanel = make("Frame", { Size = UDim2.new(1, -5, 0, 115), BackgroundColor3 = Color3.fromRGB(40, 40, 48), Visible = false }, scroll) local tpTitle = make("TextLabel", { Size = UDim2.new(1, 0, 0, 25), BackgroundTransparency = 1, Text = "Choose a player below", TextColor3 = Color3.new(1, 1, 1), TextSize = 13 }, tpPanel) local tpList = make("ScrollingFrame", { Position = UDim2.fromOffset(3, 27), Size = UDim2.new(1, -6, 1, -30), BackgroundTransparency = 1, BorderSizePixel = 0, ScrollBarThickness = 4, AutomaticCanvasSize = Enum.AutomaticSize.Y }, tpPanel) local tpLayout = make("UIListLayout", { Padding = UDim.new(0, 3) }, tpList) local tpToggle tpToggle = button("TP GUI: OFF", function() tpPanel.Visible = not tpPanel.Visible tpToggle.Text = "TP GUI: " .. (tpPanel.Visible and "ON" or "OFF") end) -- Useful label("USEFUL") local playerList = make("ScrollingFrame", { Size = UDim2.new(1, -5, 0, 115), BackgroundColor3 = Color3.fromRGB(40, 40, 48), BorderSizePixel = 0, ScrollBarThickness = 5, AutomaticCanvasSize = Enum.AutomaticSize.Y }, scroll) local playerLayout = make("UIListLayout", { Padding = UDim.new(0, 3) }, playerList) local function clearList(list) for _, item in ipairs(list:GetChildren()) do if item:IsA("TextButton") then item:Destroy() end end end local function addPlayer(list, info) local b = make("TextButton", { Size = UDim2.new(1, -5, 0, 30), BackgroundColor3 = Color3.fromRGB(65, 65, 75), TextColor3 = Color3.new(1, 1, 1), Text = info.DisplayName .. " (@" .. info.Name .. ")", TextSize = 12 }, list) b.MouseButton1Click:Connect(function() selectedId = info.UserId tpTitle.Text = "Selected: " .. info.Name end) end local function refreshPlayers() clearList(playerList) clearList(tpList) local ok, list = server("List") if not ok or type(list) ~= "table" then warn("Player list unavailable. Check server permissions.") return end for _, info in ipairs(list) do addPlayer(playerList, info) addPlayer(tpList, info) end end button("REFRESH SERVER PLAYERS", refreshPlayers) button("TELEPORT TO SELECTED PLAYER", function() if selectedId then local ok = server("Teleport", selectedId) if not ok then warn("Teleport failed.") end end end) local spectateButton spectateButton = button("SPECTATE SELECTED", function() if not selectedId then return end local target = Players:GetPlayerByUserId(selectedId) local hum = target and target.Character and target.Character:FindFirstChildOfClass("Humanoid") if hum then workspace.CurrentCamera.CameraSubject = hum spectating = true end end) button("STOP SPECTATING", function() local hum = getHumanoid() if hum then workspace.CurrentCamera.CameraSubject = hum end spectating = false end) -- Safe contact alert instead of fling local alertButton alertButton = button("TOUCH ALERT: OFF", function() alertEnabled = not alertEnabled alertButton.Text = "TOUCH ALERT: " .. (alertEnabled and "ON" or "OFF") end) local lastAlert = 0 RunService.Heartbeat:Connect(function() if not alertEnabled then return end if os.clock() - lastAlert < 1 then return end local myRoot = getRoot() if not myRoot then return end for _, other in ipairs(Players:GetPlayers()) do if other ~= player then local otherRoot = other.Character and other.Character:FindFirstChild("HumanoidRootPart") if otherRoot and (myRoot.Position - otherRoot.Position).Magnitude < 4 then lastAlert = os.clock() print("Touch Alert: near " .. other.Name) break end end end end) -- Character respawn support player.CharacterAdded:Connect(function() task.wait(1) if flying then setFly(true) end if noclip then setNoclip(true) end if spectating then local hum = getHumanoid() if hum then workspace.CurrentCamera.CameraSubject = hum end spectating = false end end) task.defer(refreshPlayers) -- Refresh the server list every 10 seconds task.spawn(function() while gui.Parent do task.wait(10) refreshPlayers() end end) print("Cool Script loaded successfully")