Carkzowk

Owp

Mar 9th, 2025
21
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.76 KB | None | 0 0
  1. -- Services
  2. local Players = game:GetService("Players")
  3. local RunService = game:GetService("RunService")
  4. local Camera = workspace.CurrentCamera
  5.  
  6. -- Variables
  7. local espData = {}
  8. local playerColors = {}
  9. local isESPEnabled = false
  10. local spectatingPlayer = nil
  11. local playerListVisible = false
  12.  
  13. -- Utility: Generate unique bright colors
  14. local function getUniqueColor()
  15. return Color3.fromHSV(math.random(), 1, 1)
  16. end
  17.  
  18. -- GUI Setup
  19. local ScreenGui = Instance.new("ScreenGui")
  20. ScreenGui.Parent = Players.LocalPlayer:WaitForChild("PlayerGui")
  21.  
  22. -- Main Frame
  23. local MainFrame = Instance.new("Frame")
  24. MainFrame.Size = UDim2.new(0, 250, 0, 400)
  25. MainFrame.Position = UDim2.new(0, 10, 0, 10)
  26. MainFrame.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
  27. MainFrame.Draggable = true
  28. MainFrame.Active = true
  29. MainFrame.Selectable = true
  30. MainFrame.Parent = ScreenGui
  31.  
  32. -- ESP Button
  33. local ESPButton = Instance.new("TextButton")
  34. ESPButton.Size = UDim2.new(0, 230, 0, 40)
  35. ESPButton.Position = UDim2.new(0, 10, 0, 10)
  36. ESPButton.BackgroundColor3 = Color3.fromRGB(100, 255, 100)
  37. ESPButton.Text = "ESP: OFF"
  38. ESPButton.Font = Enum.Font.GothamBold
  39. ESPButton.TextSize = 14
  40. ESPButton.Parent = MainFrame
  41.  
  42. -- Spectate Button
  43. local SpectateButton = Instance.new("TextButton")
  44. SpectateButton.Size = UDim2.new(0, 230, 0, 40)
  45. SpectateButton.Position = UDim2.new(0, 10, 0, 60)
  46. SpectateButton.BackgroundColor3 = Color3.fromRGB(100, 100, 255)
  47. SpectateButton.Text = "Spectate"
  48. SpectateButton.Font = Enum.Font.GothamBold
  49. SpectateButton.TextSize = 14
  50. SpectateButton.Parent = MainFrame
  51.  
  52. -- Un-Spectate Button
  53. local UnSpectateButton = Instance.new("TextButton")
  54. UnSpectateButton.Size = UDim2.new(0, 230, 0, 40)
  55. UnSpectateButton.Position = UDim2.new(0, 10, 0, 110)
  56. UnSpectateButton.BackgroundColor3 = Color3.fromRGB(255, 100, 100)
  57. UnSpectateButton.Text = "Un-Spectate"
  58. UnSpectateButton.Font = Enum.Font.GothamBold
  59. UnSpectateButton.TextSize = 14
  60. UnSpectateButton.Parent = MainFrame
  61.  
  62. -- Toggle Player List Button
  63. local PlayerListToggleButton = Instance.new("TextButton")
  64. PlayerListToggleButton.Size = UDim2.new(0, 230, 0, 40)
  65. PlayerListToggleButton.Position = UDim2.new(0, 10, 0, 160)
  66. PlayerListToggleButton.BackgroundColor3 = Color3.fromRGB(255, 200, 100)
  67. PlayerListToggleButton.Text = "Show Player List"
  68. PlayerListToggleButton.Font = Enum.Font.GothamBold
  69. PlayerListToggleButton.TextSize = 14
  70. PlayerListToggleButton.Parent = MainFrame
  71.  
  72. -- Walk Speed Button
  73. local WalkSpeedButton = Instance.new("TextButton")
  74. WalkSpeedButton.Size = UDim2.new(0, 230, 0, 40)
  75. WalkSpeedButton.Position = UDim2.new(0, 10, 0, 210)
  76. WalkSpeedButton.BackgroundColor3 = Color3.fromRGB(100, 200, 255)
  77. WalkSpeedButton.Text = "Set Walk Speed"
  78. WalkSpeedButton.Font = Enum.Font.GothamBold
  79. WalkSpeedButton.TextSize = 14
  80. WalkSpeedButton.Parent = MainFrame
  81.  
  82. -- Player List Frame
  83. local PlayerListFrame = Instance.new("ScrollingFrame")
  84. PlayerListFrame.Size = UDim2.new(0, 230, 0, 140)
  85. PlayerListFrame.Position = UDim2.new(0, 10, 0, 260)
  86. PlayerListFrame.BackgroundColor3 = Color3.fromRGB(70, 70, 70)
  87. PlayerListFrame.ScrollBarThickness = 8
  88. PlayerListFrame.Visible = false
  89. PlayerListFrame.Parent = MainFrame
  90.  
  91. local UIListLayout = Instance.new("UIListLayout")
  92. UIListLayout.Parent = PlayerListFrame
  93. UIListLayout.SortOrder = Enum.SortOrder.LayoutOrder
  94.  
  95. -- Function to create ESP
  96. local function createESP(player)
  97. if not playerColors[player] then
  98. playerColors[player] = getUniqueColor()
  99. end
  100.  
  101. local color = playerColors[player]
  102. local highlight = Instance.new("Highlight")
  103. highlight.Adornee = player.Character
  104. highlight.FillColor = color
  105. highlight.FillTransparency = 0.5
  106. highlight.OutlineColor = color
  107. highlight.OutlineTransparency = 0
  108. highlight.Parent = player.Character
  109.  
  110. espData[player] = highlight
  111. end
  112.  
  113. -- Function to remove ESP
  114. local function removeESP(player)
  115. if espData[player] then
  116. espData[player]:Destroy()
  117. espData[player] = nil
  118. end
  119. playerColors[player] = nil
  120. end
  121.  
  122. -- Function to update the player list
  123. local function updatePlayerList()
  124. for _, child in pairs(PlayerListFrame:GetChildren()) do
  125. if child:IsA("TextButton") then
  126. child:Destroy()
  127. end
  128. end
  129.  
  130. for _, player in ipairs(Players:GetPlayers()) do
  131. if player ~= Players.LocalPlayer then
  132. local button = Instance.new("TextButton")
  133. button.Size = UDim2.new(1, 0, 0, 30)
  134. button.Text = player.Name
  135. button.Font = Enum.Font.GothamBold
  136. button.TextSize = 14
  137. button.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
  138. button.TextColor3 = Color3.fromRGB(255, 255, 255)
  139. button.Parent = PlayerListFrame
  140.  
  141. button.MouseButton1Click:Connect(function()
  142. spectatingPlayer = player
  143. Camera.CameraSubject = player.Character:FindFirstChild("Humanoid")
  144. end)
  145. end
  146. end
  147. end
  148.  
  149. -- Function to toggle ESP
  150. local function toggleESP()
  151. isESPEnabled = not isESPEnabled
  152. ESPButton.Text = "ESP: " .. (isESPEnabled and "ON" or "OFF")
  153.  
  154. if isESPEnabled then
  155. for _, player in ipairs(Players:GetPlayers()) do
  156. if player ~= Players.LocalPlayer then
  157. createESP(player)
  158. end
  159. end
  160. else
  161. for _, player in ipairs(Players:GetPlayers()) do
  162. if player ~= Players.LocalPlayer then
  163. removeESP(player)
  164. end
  165. end
  166. end
  167. end
  168.  
  169. -- Function to set walk speed
  170. local function setWalkSpeed()
  171. local speedInput = tonumber(game:GetService("Players").LocalPlayer:RequestStream({ "InputDialog" }, "Set Walk Speed (1-800): "))
  172. if speedInput and speedInput >= 1 and speedInput <= 800 then
  173. if Players.LocalPlayer.Character and Players.LocalPlayer.Character:FindFirstChild("Humanoid") then
  174. Players.LocalPlayer.Character.Humanoid.WalkSpeed = speedInput
  175. end
  176. else
  177. warn("Invalid speed entered!")
  178. end
  179. end
  180.  
  181. -- Button Events
  182. ESPButton.MouseButton1Click:Connect(toggleESP)
  183.  
  184. PlayerListToggleButton.MouseButton1Click:Connect(function()
  185. playerListVisible = not playerListVisible
  186. PlayerListFrame.Visible = playerListVisible
  187. PlayerListToggleButton.Text = playerListVisible and "Hide Player List" or "Show Player List"
  188.  
  189. if playerListVisible then
  190. updatePlayerList()
  191. end
  192. end)
  193.  
  194. SpectateButton.MouseButton1Click:Connect(function()
  195. if not spectatingPlayer then
  196. warn("Select a player to spectate from the Player List.")
  197. end
  198. end)
  199.  
  200. UnSpectateButton.MouseButton1Click:Connect(function()
  201. spectatingPlayer = nil
  202. Camera.CameraSubject = Players.LocalPlayer.Character:FindFirstChild("Humanoid")
  203. end)
  204.  
  205. WalkSpeedButton.MouseButton1Click:Connect(setWalkSpeed)
Advertisement
Add Comment
Please, Sign In to add comment