
KeylessUniversal

-- Fixed and Optimized Egg ESP Script
local Players = game:GetService("Players")
local UserInputService = game:GetService("UserInputService")
local RunService = game:GetService("RunService")
local LocalPlayer = Players.LocalPlayer
local PlayerGui = LocalPlayer:WaitForChild("PlayerGui")
local Folder = workspace:FindFirstChild("RenderedEggs")
if not Folder then
warn("[ESP] workspace.RenderedEggs was not found")
return
end
local UPDATE_RATE = 0.20
local MAX_DISTANCE = 1000
local SHOW_HIGHLIGHT = true
local ESPs = {}
local EggButtons = {}
local Connections = {}
local Running = true
local ESPEnabled = true
local SelectedEgg = nil
local UIVisible = true
local PlayersESPEnabled = false
local Character
local RootPart
local function updateCharacter(character)
Character = character
RootPart = character and character:FindFirstChild("HumanoidRootPart")
end
if LocalPlayer.Character then
updateCharacter(LocalPlayer.Character)
end
Connections.CharacterAdded = LocalPlayer.CharacterAdded:Connect(function(character)
Character = character
RootPart = character:WaitForChild("HumanoidRootPart", 5)
end)
local function getRootPart(model)
if model.PrimaryPart and model.PrimaryPart:IsA("BasePart") then
return model.PrimaryPart
end
return model:FindFirstChildWhichIsA("BasePart", true)
end
local function findMyRanch()
local plots = workspace:FindFirstChild("Plots")
if not plots then
warn("[Cool Game] workspace.Plots not found")
return nil
end
for _, plot in ipairs(plots:GetChildren()) do
local data = plot:FindFirstChild("Data")
local owner = data and data:FindFirstChild("Owner")
if owner and owner.Value == LocalPlayer then
return plot
end
end
for _, plot in ipairs(plots:GetChildren()) do
if plot.Name == LocalPlayer.Name or plot.Name == tostring(LocalPlayer.UserId) then
return plot
end
end
return nil
end
--// UI Colors
local Colors = {
Background = Color3.fromRGB(16, 16, 20),
Surface = Color3.fromRGB(24, 24, 30),
SurfaceHover = Color3.fromRGB(32, 32, 40),
Accent = Color3.fromRGB(230, 50, 50),
AccentDark = Color3.fromRGB(180, 35, 35),
Success = Color3.fromRGB(40, 180, 90),
Danger = Color3.fromRGB(180, 50, 50),
Blue = Color3.fromRGB(50, 110, 220),
Text = Color3.fromRGB(255, 255, 255),
TextDim = Color3.fromRGB(160, 160, 170),
TextMuted = Color3.fromRGB(100, 100, 110),
Border = Color3.fromRGB(45, 45, 55),
Selected = Color3.fromRGB(50, 90, 170),
}
local MIN_WIDTH = 280
local MIN_HEIGHT = 360
local MAX_WIDTH = 600
local MAX_HEIGHT = 700
--// ScreenGui
local ScreenGui = Instance.new("ScreenGui")
ScreenGui.Name = "CoolGame_ESP"
ScreenGui.ResetOnSpawn = false
ScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
ScreenGui.Parent = PlayerGui
--// Main Window
local Main = Instance.new("Frame")
Main.Name = "Main"
Main.Size = UDim2.fromOffset(320, 420)
Main.Position = UDim2.new(0.5, -160, 0.12, 0)
Main.BackgroundColor3 = Colors.Background
Main.BorderSizePixel = 0
Main.ClipsDescendants = true
Main.Parent = ScreenGui
local MainCorner = Instance.new("UICorner")
MainCorner.CornerRadius = UDim.new(0, 14)
MainCorner.Parent = Main
local MainStroke = Instance.new("UIStroke")
MainStroke.Color = Colors.Accent
MainStroke.Thickness = 1.5
MainStroke.Transparency = 0.35
MainStroke.Parent = Main
--// Title Bar
local TitleBar = Instance.new("Frame")
TitleBar.Name = "TitleBar"
TitleBar.Size = UDim2.new(1, 0, 0, 44)
TitleBar.BackgroundColor3 = Colors.Accent
TitleBar.BorderSizePixel = 0
TitleBar.Parent = Main
local TitleBarCorner = Instance.new("UICorner")
TitleBarCorner.CornerRadius = UDim.new(0, 14)
TitleBarCorner.Parent = TitleBar
local TitleBarFix = Instance.new("Frame")
TitleBarFix.Size = UDim2.new(1, 0, 0, 16)
TitleBarFix.Position = UDim2.new(0, 0, 1, -16)
TitleBarFix.BackgroundColor3 = Colors.Accent
TitleBarFix.BorderSizePixel = 0
TitleBarFix.Parent = TitleBar
-- LEFT side = Drag
local DragArea = Instance.new("Frame")
DragArea.Name = "DragArea"
DragArea.Size = UDim2.new(1, -50, 1, 0)
DragArea.BackgroundTransparency = 1
DragArea.Parent = TitleBar
local Title = Instance.new("TextLabel")
Title.BackgroundTransparency = 1
Title.Position = UDim2.fromOffset(16, 0)
Title.Size = UDim2.new(1, -20, 1, 0)
Title.Font = Enum.Font.GothamBold
Title.Text = "Cool Game • Egg ESP"
Title.TextColor3 = Colors.Text
Title.TextSize = 15
Title.TextXAlignment = Enum.TextXAlignment.Left
Title.Parent = DragArea
-- RIGHT side = Resize
local ResizeArea = Instance.new("Frame")
ResizeArea.Name = "ResizeArea"
ResizeArea.Size = UDim2.fromOffset(50, 44)
ResizeArea.Position = UDim2.new(1, -50, 0, 0)
ResizeArea.BackgroundTransparency = 1
ResizeArea.Parent = TitleBar
local ResizeGrip = Instance.new("TextLabel")
ResizeGrip.BackgroundTransparency = 1
ResizeGrip.Size = UDim2.fromScale(1, 1)
ResizeGrip.Font = Enum.Font.GothamBold
ResizeGrip.Text = "⋮⋮"
ResizeGrip.TextColor3 = Color3.fromRGB(255, 200, 200)
ResizeGrip.TextSize = 16
ResizeGrip.Parent = ResizeArea
local Close = Instance.new("TextButton")
Close.BackgroundTransparency = 1
Close.Position = UDim2.new(1, -40, 0, 6)
Close.Size = UDim2.fromOffset(32, 32)
Close.Font = Enum.Font.GothamBold
Close.Text = "×"
Close.TextColor3 = Colors.Text
Close.TextSize = 22
Close.ZIndex = 5
Close.Parent = TitleBar
--// Tab Bar
local TabBar = Instance.new("Frame")
TabBar.Size = UDim2.new(1, -24, 0, 36)
TabBar.Position = UDim2.fromOffset(12, 52)
TabBar.BackgroundColor3 = Colors.Surface
TabBar.BorderSizePixel = 0
TabBar.Parent = Main
local TabBarCorner = Instance.new("UICorner")
TabBarCorner.CornerRadius = UDim.new(0, 10)
TabBarCorner.Parent = TabBar
local TabLayout = Instance.new("UIListLayout")
TabLayout.FillDirection = Enum.FillDirection.Horizontal
TabLayout.HorizontalAlignment = Enum.HorizontalAlignment.Center
TabLayout.VerticalAlignment = Enum.VerticalAlignment.Center
TabLayout.Padding = UDim.new(0, 4)
TabLayout.Parent = TabBar
local TabPadding = Instance.new("UIPadding")
TabPadding.PaddingLeft = UDim.new(0, 4)
TabPadding.PaddingRight = UDim.new(0, 4)
TabPadding.Parent = TabBar
--// Content
local Content = Instance.new("Frame")
Content.Name = "Content"
Content.Size = UDim2.new(1, -24, 1, -110)
Content.Position = UDim2.fromOffset(12, 96)
Content.BackgroundTransparency = 1
Content.Parent = Main
--// Status Bar
local StatusBar = Instance.new("Frame")
StatusBar.Size = UDim2.new(1, -24, 0, 28)
StatusBar.Position = UDim2.new(0, 12, 1, -36)
StatusBar.BackgroundColor3 = Colors.Surface
StatusBar.BorderSizePixel = 0
StatusBar.Parent = Main
local StatusCorner = Instance.new("UICorner")
StatusCorner.CornerRadius = UDim.new(0, 8)
StatusCorner.Parent = StatusBar
local StatusLabel = Instance.new("TextLabel")
StatusLabel.BackgroundTransparency = 1
StatusLabel.Size = UDim2.fromScale(1, 1)
StatusLabel.Position = UDim2.fromOffset(10, 0)
StatusLabel.Font = Enum.Font.Gotham
StatusLabel.Text = "Ready"
StatusLabel.TextColor3 = Colors.TextDim
StatusLabel.TextSize = 12
StatusLabel.TextXAlignment = Enum.TextXAlignment.Left
StatusLabel.Parent = StatusBar
--// Floating Toggle
local ToggleUI = Instance.new("TextButton")
ToggleUI.Name = "CoolGameToggle"
ToggleUI.Size = UDim2.fromOffset(130, 38)
ToggleUI.Position = UDim2.new(0, 18, 0.5, -19)
ToggleUI.BackgroundColor3 = Colors.Accent
ToggleUI.BorderSizePixel = 0
ToggleUI.Font = Enum.Font.GothamBold
ToggleUI.Text = "Cool Game 🎮"
ToggleUI.TextColor3 = Colors.Text
ToggleUI.TextSize = 14
ToggleUI.Parent = ScreenGui
ToggleUI.ZIndex = 10
local ToggleUICorner = Instance.new("UICorner")
ToggleUICorner.CornerRadius = UDim.new(0, 10)
ToggleUICorner.Parent = ToggleUI
local ToggleUIStroke = Instance.new("UIStroke")
ToggleUIStroke.Color = Color3.fromRGB(255, 100, 100)
ToggleUIStroke.Thickness = 1.5
ToggleUIStroke.Parent = ToggleUI
--// Tabs
local Tabs = {}
local CurrentTab = nil
local function createTab(name, order)
local tabBtn = Instance.new("TextButton")
tabBtn.Name = name
tabBtn.Size = UDim2.new(0.33, -4, 1, -8)
tabBtn.BackgroundColor3 = Colors.Surface
tabBtn.BorderSizePixel = 0
tabBtn.Font = Enum.Font.GothamBold
tabBtn.Text = name
tabBtn.TextColor3 = Colors.TextDim
tabBtn.TextSize = 13
tabBtn.LayoutOrder = order
tabBtn.Parent = TabBar
local corner = Instance.new("UICorner")
corner.CornerRadius = UDim.new(0, 8)
corner.Parent = tabBtn
local page = Instance.new("Frame")
page.Name = name .. "Page"
page.Size = UDim2.fromScale(1, 1)
page.BackgroundTransparency = 1
page.Visible = false
page.Parent = Content
Tabs[name] = {
Button = tabBtn,
Page = page
}
tabBtn.MouseButton1Click:Connect(function()
switchTab(name)
end)
return page
end
function switchTab(name)
if CurrentTab == name then return end
for tabName, data in pairs(Tabs) do
local isActive = (tabName == name)
data.Page.Visible = isActive
data.Button.BackgroundColor3 = isActive and Colors.Accent or Colors.Surface
data.Button.TextColor3 = isActive and Colors.Text or Colors.TextDim
end
CurrentTab = name
end
local EspPage = createTab("ESP", 1)
local ExploitsPage = createTab("Exploits", 2)
local SettingsPage = createTab("Settings", 3)
--// ESP PAGE
local EspToggle = Instance.new("TextButton")
EspToggle.Size = UDim2.new(1, 0, 0, 38)
EspToggle.BackgroundColor3 = Colors.Success
EspToggle.BorderSizePixel = 0
EspToggle.Font = Enum.Font.GothamBold
EspToggle.Text = "ESP: ON"
EspToggle.TextColor3 = Colors.Text
EspToggle.TextSize = 14
EspToggle.Parent = EspPage
local EspToggleCorner = Instance.new("UICorner")
EspToggleCorner.CornerRadius = UDim.new(0, 9)
EspToggleCorner.Parent = EspToggle
local SelectedLabel = Instance.new("TextLabel")
SelectedLabel.BackgroundTransparency = 1
SelectedLabel.Position = UDim2.fromOffset(0, 48)
SelectedLabel.Size = UDim2.new(1, 0, 0, 22)
SelectedLabel.Font = Enum.Font.Gotham
SelectedLabel.Text = "Selected: None"
SelectedLabel.TextColor3 = Colors.TextDim
SelectedLabel.TextSize = 13
SelectedLabel.TextXAlignment = Enum.TextXAlignment.Left
SelectedLabel.Parent = EspPage
local List = Instance.new("ScrollingFrame")
List.Name = "EggList"
List.Position = UDim2.fromOffset(0, 76)
List.Size = UDim2.new(1, 0, 1, -76)
List.BackgroundColor3 = Colors.Surface
List.BorderSizePixel = 0
List.ScrollBarThickness = 4
List.ScrollBarImageColor3 = Colors.Accent
List.CanvasSize = UDim2.new(0, 0, 0, 0)
List.AutomaticCanvasSize = Enum.AutomaticSize.Y
List.Parent = EspPage
local ListCorner = Instance.new("UICorner")
ListCorner.CornerRadius = UDim.new(0, 10)
ListCorner.Parent = List
local ListStroke = Instance.new("UIStroke")
ListStroke.Color = Colors.Border
ListStroke.Thickness = 1
ListStroke.Parent = List
local Layout = Instance.new("UIListLayout")
Layout.Padding = UDim.new(0, 5)
Layout.SortOrder = Enum.SortOrder.Name
Layout.Parent = List
local ListPad = Instance.new("UIPadding")
ListPad.PaddingTop = UDim.new(0, 6)
ListPad.PaddingBottom = UDim.new(0, 6)
ListPad.PaddingLeft = UDim.new(0, 6)
ListPad.PaddingRight = UDim.new(0, 6)
ListPad.Parent = List
--// EXPLOITS PAGE
local PlayersESPToggle = Instance.new("TextButton")
PlayersESPToggle.Size = UDim2.new(1, 0, 0, 38)
PlayersESPToggle.Position = UDim2.fromOffset(0, 10)
PlayersESPToggle.BackgroundColor3 = Colors.SurfaceHover
PlayersESPToggle.BorderSizePixel = 0
PlayersESPToggle.Font = Enum.Font.GothamBold
PlayersESPToggle.Text = "Players ESP: OFF"
PlayersESPToggle.TextColor3 = Colors.Text
PlayersESPToggle.TextSize = 14
PlayersESPToggle.Parent = ExploitsPage
local PlayersESPCorner = Instance.new("UICorner")
PlayersESPCorner.CornerRadius = UDim.new(0, 9)
PlayersESPCorner.Parent = PlayersESPToggle
local TeleportEggBtn = Instance.new("TextButton")
TeleportEggBtn.Size = UDim2.new(1, 0, 0, 44)
TeleportEggBtn.Position = UDim2.fromOffset(0, 60)
TeleportEggBtn.BackgroundColor3 = Colors.Blue
TeleportEggBtn.BorderSizePixel = 0
TeleportEggBtn.Font = Enum.Font.GothamBold
TeleportEggBtn.Text = "Teleport to Selected Egg"
TeleportEggBtn.TextColor3 = Colors.Text
TeleportEggBtn.TextSize = 14
TeleportEggBtn.Parent = ExploitsPage
local TeleportEggCorner = Instance.new("UICorner")
TeleportEggCorner.CornerRadius = UDim.new(0, 10)
TeleportEggCorner.Parent = TeleportEggBtn
local RanchBtn = Instance.new("TextButton")
RanchBtn.Size = UDim2.new(1, 0, 0, 44)
RanchBtn.Position = UDim2.fromOffset(0, 116)
RanchBtn.BackgroundColor3 = Colors.Accent
RanchBtn.BorderSizePixel = 0
RanchBtn.Font = Enum.Font.GothamBold
RanchBtn.Text = "Teleport to My Ranch"
RanchBtn.TextColor3 = Colors.Text
RanchBtn.TextSize = 14
RanchBtn.Parent = ExploitsPage
local RanchCorner = Instance.new("UICorner")
RanchCorner.CornerRadius = UDim.new(0, 10)
RanchCorner.Parent = RanchBtn
local ExploitInfo = Instance.new("TextLabel")
ExploitInfo.BackgroundTransparency = 1
ExploitInfo.Position = UDim2.fromOffset(0, 180)
ExploitInfo.Size = UDim2.new(1, 0, 0, 80)
ExploitInfo.Font = Enum.Font.Gotham
ExploitInfo.Text = "• Players ESP - shows info about players\n• Teleport to Selected Egg - moves you to egg\n• Teleport to My Ranch - moves you to your ranch"
ExploitInfo.TextColor3 = Colors.TextMuted
ExploitInfo.TextSize = 13
ExploitInfo.TextWrapped = true
ExploitInfo.TextXAlignment = Enum.TextXAlignment.Left
ExploitInfo.Parent = ExploitsPage
--// SETTINGS PAGE
local CreditsTitle = Instance.new("TextLabel")
CreditsTitle.BackgroundTransparency = 1
CreditsTitle.Size = UDim2.new(1, 0, 0, 24)
CreditsTitle.Font = Enum.Font.GothamBold
CreditsTitle.Text = "Credits"
CreditsTitle.TextColor3 = Colors.Text
CreditsTitle.TextSize = 14
CreditsTitle.TextXAlignment = Enum.TextXAlignment.Left
CreditsTitle.Parent = SettingsPage
local CreditsLabel = Instance.new("TextLabel")
CreditsLabel.BackgroundTransparency = 1
CreditsLabel.Position = UDim2.fromOffset(0, 28)
CreditsLabel.Size = UDim2.new(1, 0, 0, 40)
CreditsLabel.Font = Enum.Font.Gotham
CreditsLabel.Text = "YT @Byteeezzzz\nTikTok coolgamescripter"
CreditsLabel.TextColor3 = Colors.TextDim
CreditsLabel.TextSize = 13
CreditsLabel.TextXAlignment = Enum.TextXAlignment.Left
CreditsLabel.Parent = SettingsPage
local ControlsTitle = Instance.new("TextLabel")
ControlsTitle.BackgroundTransparency = 1
ControlsTitle.Position = UDim2.fromOffset(0, 80)
ControlsTitle.Size = UDim2.new(1, 0, 0, 24)
ControlsTitle.Font = Enum.Font.GothamBold
ControlsTitle.Text = "Controls"
ControlsTitle.TextColor3 = Colors.Text
ControlsTitle.TextSize = 14
ControlsTitle.TextXAlignment = Enum.TextXAlignment.Left
ControlsTitle.Parent = SettingsPage
local ControlsLabel = Instance.new("TextLabel")
ControlsLabel.BackgroundTransparency = 1
ControlsLabel.Position = UDim2.fromOffset(0, 108)
ControlsLabel.Size = UDim2.new(1, 0, 0, 80)
ControlsLabel.Font = Enum.Font.Gotham
ControlsLabel.Text = "• Drag LEFT side of red bar = Move\n• Drag RIGHT side of red bar = Resize\n• Press X to fully shutdown\n• Side button hides/shows UI"
ControlsLabel.TextColor3 = Colors.TextDim
ControlsLabel.TextSize = 13
ControlsLabel.TextXAlignment = Enum.TextXAlignment.Left
ControlsLabel.Parent = SettingsPage
switchTab("ESP")
--// DRAG
local dragging = false
local dragStart = nil
local startPos = nil
local function updateDrag(input)
local delta = input.Position - dragStart
Main.Position = UDim2.new(
startPos.X.Scale,
startPos.X.Offset + delta.X,
startPos.Y.Scale,
startPos.Y.Offset + delta.Y
)
end
DragArea.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
input.Changed:Connect(function()
if input.UserInputState == Enum.UserInputState.End then
dragging = false
end
end)
end
end)
DragArea.InputChanged:Connect(function(input)
if dragging and (input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch) then
updateDrag(input)
end
end)
UserInputService.InputChanged:Connect(function(input)
if dragging and (input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch) then
updateDrag(input)
end
end)
UserInputService.InputEnded:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
dragging = false
resizing = false
end
end)
--// RESIZE
local resizing = false
local resizeStart = nil
local startSize = nil
local function updateResize(input)
local delta = input.Position - resizeStart
local newWidth = math.clamp(startSize.X.Offset + delta.X, MIN_WIDTH, MAX_WIDTH)
local newHeight = math.clamp(startSize.Y.Offset + delta.Y, MIN_HEIGHT, MAX_HEIGHT)
Main.Size = UDim2.fromOffset(newWidth, newHeight)
end
ResizeArea.InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
resizing = true
resizeStart = input.Position
startSize = Main.Size
input.Changed:Connect(function()
if input.UserInputState == Enum.UserInputState.End then
resizing = false
end
end)
end
end)
ResizeArea.InputChanged:Connect(function(input)
if resizing and (input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch) then
updateResize(input)
end
end)
UserInputService.InputChanged:Connect(function(input)
if resizing and (input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch) then
updateResize(input)
end
end)
--// ESP Logic
local function createESP(model)
if not Running or not model:IsA("Model") or ESPs[model] then return end
local part = getRootPart(model)
if not part then return end
local highlight
if SHOW_HIGHLIGHT then
highlight = Instance.new("Highlight")
highlight.Name = "RenderedEggsESP"
highlight.Adornee = model
highlight.DepthMode = Enum.HighlightDepthMode.AlwaysOnTop
highlight.FillTransparency = 0.75
highlight.OutlineTransparency = 0
highlight.Enabled = ESPEnabled
highlight.Parent = model
end
local billboard = Instance.new("BillboardGui")
billboard.Name = "RenderedEggsESP"
billboard.Adornee = part
billboard.Size = UDim2.fromOffset(180, 36)
billboard.StudsOffset = Vector3.new(0, 3, 0)
billboard.AlwaysOnTop = true
billboard.Enabled = ESPEnabled
billboard.Parent = part
local label = Instance.new("TextLabel")
label.BackgroundTransparency = 1
label.Size = UDim2.fromScale(1, 1)
label.Font = Enum.Font.GothamBold
label.TextSize = 14
label.TextColor3 = Color3.new(1, 1, 1)
label.TextStrokeTransparency = 0
label.TextStrokeColor3 = Color3.new(0, 0, 0)
label.Text = model.Name
label.Parent = billboard
ESPs[model] = {
Part = part,
Billboard = billboard,
Label = label,
Highlight = highlight
}
end
local function removeESP(model)
local data = ESPs[model]
if not data then return end
if data.Billboard then data.Billboard:Destroy() end
if data.Highlight then data.Highlight:Destroy() end
ESPs[model] = nil
end
local function createEggButton(model)
if not model:IsA("Model") or EggButtons[model] then return end
local Button = Instance.new("TextButton")
Button.Name = model.Name
Button.Size = UDim2.new(1, -12, 0, 32)
Button.BackgroundColor3 = Colors.SurfaceHover
Button.BorderSizePixel = 0
Button.Font = Enum.Font.GothamSemibold
Button.TextColor3 = Colors.Text
Button.TextSize = 12
Button.TextXA



yo bro