Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- return function(key)
- print(key.mouse)
- print(key.camera)
- print(key.ui)
- end
- local SourceURL = 'https://github.com/depthso/Roblox-ImGUI/raw/main/ImGui.lua'
- ImGui = loadstring(game:HttpGet(SourceURL))()
- local Window = ImGui:CreateWindow({
- Title = "cheaps - script",
- Size = UDim2.fromOffset(500, 350),
- Position = UDim2.new(0, 10, 0, 0, 70),
- --// Styles
- NoGradientAll = true,
- Colors = {
- Window = {
- BackgroundColor3 = Color3.fromRGB(40, 40, 40),
- BackgroundTransparency = 0.01,
- ResizeGrip = {
- TextColor3 = Color3.fromRGB(80, 80, 80)
- },
- TitleBar = {
- BackgroundColor3 = Color3.fromRGB(25, 25, 25),
- [{
- Recursive = true,
- Name = "ToggleButton"
- }] = {
- BackgroundColor3 = Color3.fromRGB(80, 80, 80)
- }
- },
- ToolBar = {
- TabButton = {
- BackgroundColor3 = Color3.fromRGB(80, 80, 80)
- }
- }
- },
- CheckBox = {
- Tickbox = {
- BackgroundColor3 = Color3.fromRGB(20, 20, 20),
- Tick = {
- ImageColor3 = Color3.fromRGB(255, 255, 255)
- }
- }
- },
- Slider = {
- Grab = {
- BackgroundColor3 = Color3.fromRGB(60, 60, 60)
- },
- BackgroundColor3 = Color3.fromRGB(10, 10, 10)
- },
- CollapsingHeader = {
- TitleBar = {
- BackgroundColor3 = Color3.fromRGB(20, 20, 20)
- }
- }
- }
- })
- local aimTab = Window:CreateTab({
- Name = "aimlock",
- })
- local espTab = Window:CreateTab({
- Name = "esp",
- })
- local miscTab = Window:CreateTab({
- Name = "misc",
- })
- local settingsTab = Window:CreateTab({
- Name = "settings",
- })
- local Players = game:GetService("Players")
- local RunService = game:GetService("RunService")
- local UserInputService = game:GetService("UserInputService")
- local LocalPlayer = Players.LocalPlayer
- local Camera = workspace.CurrentCamera
- local espEnabled = true
- local box2DEnabled = true
- local box3DEnabled = false
- local cameraEnabled = false
- local lockedPlayer = nil
- local function create2DBox(player)
- local box = Drawing.new("Square")
- box.Thickness = 0.2
- box.Color = Color3.new(1, 1, 1) -- 白色
- box.Filled = false
- local shadow = Drawing.new("Square")
- shadow.Thickness = 0.2
- shadow.Color = Color3.new(0, 0, 0) -- 黑色
- shadow.Filled = true
- shadow.Transparency = 0.2 -- 阴影透明度
- local connection
- connection = RunService.RenderStepped:Connect(function()
- if espEnabled and box2DEnabled and player.Character and player.Character:FindFirstChild("HumanoidRootPart") then
- local rootPart = player.Character.HumanoidRootPart
- local screenPos, onScreen = workspace.CurrentCamera:WorldToViewportPoint(rootPart.Position)
- if onScreen then
- local distance = (workspace.CurrentCamera.CFrame.Position - rootPart.Position).Magnitude
- local fov = workspace.CurrentCamera.FieldOfView
- local sizeFactor = (175 / distance) * (60 / fov) -- 根据距离和 FOV 调整框的大小
- box.Size = Vector2.new(sizeFactor * 14, sizeFactor * 24) -- 调整框的大小
- box.Position = Vector2.new(screenPos.X - box.Size.X / 2, screenPos.Y - box.Size.Y / 2)
- box.Visible = true
- shadow.Size = box.Size
- shadow.Position = box.Position + Vector2.new(1, 1) -- 阴影偏移
- shadow.Visible = true
- else
- box.Visible = false
- shadow.Visible = false
- end
- else
- box.Visible = false
- shadow.Visible = false
- end
- end)
- return function()
- connection:Disconnect()
- box:Remove()
- shadow:Remove()
- end
- end
- local function create3DBox(player)
- local box = Instance.new("BoxHandleAdornment")
- box.Size = Vector3.new(4, 6, 4) -- 调整框的大小
- box.Color3 = Color3.new(1, 1, 1) -- 白色
- box.Transparency = 0.1
- box.AlwaysOnTop = true
- box.ZIndex = 1
- box.Adornee = player.Character and player.Character:FindFirstChild("HumanoidRootPart")
- box.Parent = workspace
- local connection
- connection = RunService.RenderStepped:Connect(function()
- if espEnabled and box3DEnabled and player.Character and player.Character:FindFirstChild("HumanoidRootPart") then
- box.Adornee = player.Character.HumanoidRootPart
- box.Visible = true
- else
- box.Visible = false
- end
- end)
- return function()
- connection:Disconnect()
- box:Destroy()
- end
- end
- local espConnections = {}
- local function onPlayerAdded(player)
- if player ~= LocalPlayer then
- if box2DEnabled then
- espConnections[player] = create2DBox(player)
- elseif box3DEnabled then
- espConnections[player] = create3DBox(player)
- end
- end
- end
- local function onPlayerRemoving(player)
- if espConnections[player] then
- espConnections[player]()
- espConnections[player] = nil
- end
- end
- Players.PlayerAdded:Connect(onPlayerAdded)
- Players.PlayerRemoving:Connect(onPlayerRemoving)
- for _, player in ipairs(Players:GetPlayers()) do
- if player ~= LocalPlayer then
- onPlayerAdded(player)
- end
- end
- espTab:Checkbox({
- Label = "Enable",
- Value = false,
- Callback = function(self, Value)
- espEnabled = Value
- if not espEnabled then
- for _, player in ipairs(Players:GetPlayers()) do
- if espConnections[player] then
- espConnections[player]()
- espConnections[player] = nil
- end
- end
- else
- for _, player in ipairs(Players:GetPlayers()) do
- if player ~= LocalPlayer then
- onPlayerAdded(player)
- end
- end
- end
- end,
- })
- espTab:Checkbox({
- Label = "2D Box",
- Value = false,
- Callback = function(self, Value)
- box2DEnabled = Value
- if box2DEnabled then
- for _, player in ipairs(Players:GetPlayers()) do
- if player ~= LocalPlayer then
- espConnections[player] = create2DBox(player)
- end
- end
- else
- for _, player in ipairs(Players:GetPlayers()) do
- if espConnections[player] then
- espConnections[player]()
- espConnections[player] = nil
- end
- end
- end
- end,
- })
- espTab:Checkbox({
- Label = "3D Box [Beta]",
- Value = false,
- Callback = function(self, Value)
- box3DEnabled = Value
- if box3DEnabled then
- for _, player in ipairs(Players:GetPlayers()) do
- if player ~= LocalPlayer then
- espConnections[player] = create3DBox(player)
- end
- end
- else
- for _, player in ipairs(Players:GetPlayers()) do
- if espConnections[player] then
- espConnections[player]()
- espConnections[player] = nil
- end
- end
- end
- end,
- })
- aimTab:Separator({
- Text = "AimAssist"
- })
- aimTab:Checkbox({
- Label = "Camera",
- Value = false,
- Callback = function(self, Value)
- cameraEnabled = Value
- if cameraEnabled then
- -- 启用第二个脚本
- local function getClosestPlayer()
- local closestPlayer = nil
- local shortestDistance = math.huge
- for _, player in ipairs(Players:GetPlayers()) do
- if player ~= LocalPlayer and player.Character and player.Character:FindFirstChild("HumanoidRootPart") then
- local rootPart = player.Character.HumanoidRootPart
- local screenPos, onScreen = Camera:WorldToViewportPoint(rootPart.Position)
- if onScreen then
- local mousePos = UserInputService:GetMouseLocation()
- local distance = (Vector2.new(screenPos.X, screenPos.Y) - mousePos).Magnitude
- if distance < shortestDistance then
- closestPlayer = player
- shortestDistance = distance
- end
- end
- end
- end
- return closestPlayer
- end
- UserInputService.InputBegan:Connect(function(input, gameProcessed)
- if cameraEnabled and input.KeyCode == key.camera and not gameProcessed then
- lockedPlayer = getClosestPlayer()
- end
- end)
- UserInputService.InputEnded:Connect(function(input, gameProcessed)
- if cameraEnabled and input.KeyCode == key.camera and not gameProcessed then
- lockedPlayer = nil
- end
- end)
- RunService.RenderStepped:Connect(function()
- if cameraEnabled and lockedPlayer and lockedPlayer.Character and lockedPlayer.Character:FindFirstChild("HumanoidRootPart") then
- local rootPart = lockedPlayer.Character.Head
- Camera.CFrame = CFrame.new(Camera.CFrame.Position, rootPart.Position)
- end
- end)
- else
- -- 禁用第二个脚本
- lockedPlayer = nil
- end
- end
- })
- local Players = game:GetService("Players")
- local RunService = game:GetService("RunService")
- local UserInputService = game:GetService("UserInputService")
- local LocalPlayer = Players.LocalPlayer
- local lockedPlayer = nil
- local mouseEnabled = false
- local function getClosestPlayer()
- local closestPlayer = nil
- local shortestDistance = math.huge
- for _, player in ipairs(Players:GetPlayers()) do
- if player ~= LocalPlayer and player.Character and player.Character:FindFirstChild("HumanoidRootPart") then
- local rootPart = player.Character.HumanoidRootPart
- local mousePos = UserInputService:GetMouseLocation()
- local screenPos, onScreen = workspace.CurrentCamera:WorldToViewportPoint(rootPart.Position)
- if onScreen then
- local distance = (Vector2.new(screenPos.X, screenPos.Y) - mousePos).Magnitude
- if distance < shortestDistance then
- closestPlayer = player
- shortestDistance = distance
- end
- end
- end
- end
- return closestPlayer
- end
- aimTab:Checkbox({
- Label = "Mouse",
- Value = false,
- Callback = function(self, Value)
- mouseEnabled = Value
- end
- })
- local mouseSpeed = 2
- UserInputService.InputBegan:Connect(function(input, gameProcessed)
- if mouseEnabled and input.KeyCode == key.mouse and not gameProcessed then
- lockedPlayer = getClosestPlayer()
- end
- end)
- UserInputService.InputEnded:Connect(function(input, gameProcessed)
- if mouseEnabled and input.KeyCode == key.mouse and not gameProcessed then
- lockedPlayer = nil
- end
- end)
- RunService.RenderStepped:Connect(function()
- if mouseEnabled and lockedPlayer and lockedPlayer.Character and lockedPlayer.Character:FindFirstChild("HumanoidRootPart") then
- local rootPart = lockedPlayer.Character.Head
- local screenPos = workspace.CurrentCamera:WorldToViewportPoint(rootPart.Position)
- local mousePos = UserInputService:GetMouseLocation()
- local deltaX = (screenPos.X - mousePos.X) * mouseSpeed
- local deltaY = (screenPos.Y - mousePos.Y) * mouseSpeed
- mousemoverel(deltaX, deltaY)
- end
- end)
- aimTab:Checkbox({
- Label = "Silent [soon]",
- Value = false,
- Callback = function(self, Value)
- end
- })
- aimTab:Separator({
- Text = "Fov and Settings:"
- })
- local UserInputService = game:GetService("UserInputService")
- local RunService = game:GetService("RunService")
- local circle = Drawing.new("Circle")
- circle.Thickness = 1
- circle.Radius = 100
- circle.Color = Color3.new(1, 1, 1)
- circle.Filled = false
- circle.Visible = false
- aimTab:Checkbox({
- Label = "Fov Enable [soon]",
- Value = false,
- Callback = function(self, Value)
- circle.Visible = Value
- end
- })
- RunService.RenderStepped:Connect(function()
- if circle.Visible then
- local mousePos = UserInputService:GetMouseLocation()
- circle.Position = Vector2.new(mousePos.X, mousePos.Y)
- end
- end)
- aimTab:Slider({
- Label = "FOV",
- Value = 80,
- MinValue = 10,
- MaxValue = 500,
- Callback = function(self, Value)
- circle.Radius = Value
- end
- })
- aimTab:Separator({
- Text = "Smoothing"
- })
- aimTab:Slider({
- Label = "Camera",
- Value = 0.1,
- MinValue = 0.1,
- MaxValue = 1,
- Callback = function(self, Value)
- mouseSpeed = Value
- end
- })
- aimTab:Slider({
- Label = "Mouse",
- Value = 0.1,
- MinValue = 0.1,
- MaxValue = 1,
- Callback = function(self, Value)
- mouseSpeed = Value
- end
- })
- ------misc
- miscTab:Slider({
- Label = "FOV",
- Value = workspace.CurrentCamera.FieldOfView,
- MinValue = 70,
- MaxValue = 120,
- Callback = function(self, Value)
- workspace.CurrentCamera.FieldOfView = Value
- circle.Radius = Value
- end
- })
- local Keybinds = settingsTab:CollapsingHeader({
- Title = "Keybinds"
- })
- Keybinds:Keybind({
- Label = "Toggle UI",
- Value = key.ui,
- Callback = function()
- Window:SetVisible(not Window.Visible)
- end
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement