Untitled
Untitled
-- Main Window
local MainFrame = Instance.new("Frame")
MainFrame.Size = UDim2.new(0, 400, 0, 550) -- Larger for more settings
MainFrame.Position = UDim2.new(0.5, -200, 0.5, -275)
MainFrame.BackgroundColor3 = Theme.Background
MainFrame.BorderSizePixel = 0
MainFrame.Active = true
MainFrame.Draggable = true
MainFrame.Visible = false
MainFrame.Parent = ScreenGui
-- Title Bar
local TitleBar = Instance.new("Frame")
TitleBar.Size = UDim2.new(1, 0, 0, 50)
TitleBar.BackgroundColor3 = Theme.Main
TitleBar.Parent = MainFrame
-- Title Text
local TitleText = Instance.new("TextLabel")
TitleText.Text = "CHERRY AIMBOT v7.0"
TitleText.Size = UDim2.new(1, -80, 1, 0)
TitleText.Position = UDim2.new(0, 70, 0, 0)
TitleText.BackgroundTransparency = 1
TitleText.TextColor3 = Color3.new(1,1,1)
TitleText.Font = Enum.Font.GothamBold
TitleText.TextSize = 16
TitleText.Parent = TitleBar
SliderButton.MouseButton1Down:Connect(function()
dragging = true
end)
UserInputService.InputEnded:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 then
dragging = false
end
end)
SliderTrack.InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 then
dragging = true
local percent = (input.Position.X -
SliderTrack.AbsolutePosition.X)/SliderTrack.AbsoluteSize.X
Config[configKey] = math.floor(min + (max-min) * percent)
SliderFill.Size = UDim2.new(percent, 0, 1, 0)
SliderButton.Position = UDim2.new(percent, -7, 0, -5)
SliderLabel.Text = name..": "..Config[configKey]
end
end)
RunService.Heartbeat:Connect(function()
if dragging then
local percent = (UserInputService:GetMouseLocation().X -
SliderTrack.AbsolutePosition.X)/SliderTrack.AbsoluteSize.X
percent = math.clamp(percent, 0, 1)
Config[configKey] = math.floor(min + (max-min) * percent)
SliderFill.Size = UDim2.new(percent, 0, 1, 0)
SliderButton.Position = UDim2.new(percent, -7, 0, -5)
SliderLabel.Text = name..": "..Config[configKey]
end
end)
return SliderFrame
end
KeybindButton.MouseButton1Click:Connect(function()
listening = true
KeybindButton.Text = "[Press Key]"
end)
UserInputService.InputBegan:Connect(function(input, processed)
if listening and not processed then
if input.UserInputType == Enum.UserInputType.Keyboard then
Config[configKey] = input.KeyCode
KeybindButton.Text = input.KeyCode.Name:gsub("Enum.KeyCode.", "")
listening = false
end
end
end)
return KeybindFrame
end
ToggleButton.MouseButton1Click:Connect(function()
Config[configKey] = not Config[configKey]
ToggleButton.BackgroundColor3 = Config[configKey] and Theme.Main or
Color3.fromRGB(200,200,200)
ToggleButton.Text = Config[configKey] and "ON" or "OFF"
end)
yPos = yPos + 60
return ToggleFrame
end
-- Sliders
yPos = CreateSlider("FOV Size", "FOV", 10, 120, yPos)
yPos = CreateSlider("Smoothness", "Smoothness", 0.1, 1, yPos)
yPos = CreateSlider("Prediction", "Prediction", 0, 0.5, yPos)
yPos = CreateSlider("Max Targets", "MaxTargets", 1, 10, yPos)
yPos = CreateSlider("Update Rate", "UpdateRate", 10, 60, yPos)
-- Keybinds
yPos = CreateKeybind("Toggle Key", "ToggleKey", yPos)
yPos = CreateKeybind("UI Key", "UIToggleKey", yPos)
-- Kill Button
local KillButton = Instance.new("TextButton")
KillButton.Text = "KILL SCRIPT"
KillButton.Size = UDim2.new(1, -40, 0, 40)
KillButton.Position = UDim2.new(0, 20, 0, yPos + 10)
KillButton.BackgroundColor3 = Color3.fromRGB(255, 80, 80)
KillButton.TextColor3 = Color3.new(1,1,1)
KillButton.Font = Enum.Font.GothamBold
KillButton.TextSize = 16
KillButton.Parent = SettingsFrame
KillButton.MouseButton1Click:Connect(function()
ScreenGui:Destroy()
end)
local count = 0
for _,player in pairs(Players:GetPlayers()) do
if player ~= Players.LocalPlayer and count < Config.MaxTargets then
local char = player.Character
if char then
local humanoid = char:FindFirstChildOfClass("Humanoid")
local root = char:FindFirstChild("HumanoidRootPart")
local screenPos =
workspace.CurrentCamera:WorldToViewportPoint(root.Position)
if screenPos.Z > 0 then
local mousePos = UserInputService:GetMouseLocation()
local dist = (Vector2.new(screenPos.X, screenPos.Y) -
Vector2.new(mousePos.X, mousePos.Y)).Magnitude
return closest
end
-- Main loop
RunService.Heartbeat:Connect(function()
-- Update FOV visibility
FOVCircle.Visible = Config.ShowFOV and Config.Enabled and (not
Config.StealthMode)
FOVCircle.Size = UDim2.new(0, Config.FOV*2, 0, Config.FOV*2)
FOVCircle.ImageColor3 = Config.FOVColor
-- Prediction
local predictedPos = targetPart.Position
if Config.Prediction > 0 then
local targetVel = target:FindFirstChild("HumanoidRootPart").Velocity
predictedPos = predictedPos + (targetVel * Config.Prediction)
end
-- Smooth aiming
local camera = workspace.CurrentCamera
local camCF = camera.CFrame
local direction = (predictedPos - camCF.Position).Unit
local goalCF = CFrame.new(camCF.Position, camCF.Position + direction)
-- Keybinds
UserInputService.InputBegan:Connect(function(input, processed)
if processed then return end
-- Initial message
print("Cherry Aimbot v7.0 Loaded! >_<")