Advertisement
kele666CN

test sivv

Jan 21st, 2025 (edited)
29
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 13.97 KB | Cybersecurity | 0 0
  1. return function(key)
  2.     print(key.mouse)
  3.     print(key.camera)
  4.     print(key.ui)
  5. end
  6.  
  7. local SourceURL = 'https://github.com/depthso/Roblox-ImGUI/raw/main/ImGui.lua'
  8. ImGui = loadstring(game:HttpGet(SourceURL))()
  9.  
  10. local Window = ImGui:CreateWindow({
  11.     Title = "cheaps - script",
  12.     Size = UDim2.fromOffset(500, 350),
  13.     Position = UDim2.new(0, 10, 0, 0, 70),
  14.    
  15.     --// Styles
  16.     NoGradientAll = true,
  17.     Colors = {
  18.         Window = {
  19.             BackgroundColor3 = Color3.fromRGB(40, 40, 40),
  20.             BackgroundTransparency = 0.01,
  21.             ResizeGrip = {
  22.                 TextColor3 = Color3.fromRGB(80, 80, 80)
  23.             },
  24.            
  25.             TitleBar = {
  26.                 BackgroundColor3 = Color3.fromRGB(25, 25, 25),
  27.                 [{
  28.                     Recursive = true,
  29.                     Name = "ToggleButton"
  30.                 }] = {
  31.                     BackgroundColor3 = Color3.fromRGB(80, 80, 80)
  32.                 }
  33.             },
  34.             ToolBar = {
  35.                 TabButton = {
  36.                     BackgroundColor3 = Color3.fromRGB(80, 80, 80)
  37.                 }
  38.             }
  39.         },
  40.         CheckBox = {
  41.             Tickbox = {
  42.                 BackgroundColor3 = Color3.fromRGB(20, 20, 20),
  43.                 Tick = {
  44.                     ImageColor3 = Color3.fromRGB(255, 255, 255)
  45.                 }
  46.             }
  47.         },
  48.         Slider = {
  49.             Grab = {
  50.                 BackgroundColor3 = Color3.fromRGB(60, 60, 60)
  51.             },
  52.             BackgroundColor3 = Color3.fromRGB(10, 10, 10)
  53.         },
  54.         CollapsingHeader = {
  55.             TitleBar = {
  56.                 BackgroundColor3 = Color3.fromRGB(20, 20, 20)
  57.             }
  58.         }
  59.     }
  60. })
  61.  
  62. local aimTab = Window:CreateTab({
  63.     Name = "aimlock",
  64. })
  65.  
  66. local espTab = Window:CreateTab({
  67.     Name = "esp",
  68. })
  69.  
  70. local miscTab = Window:CreateTab({
  71.     Name = "misc",
  72. })
  73.  
  74. local settingsTab = Window:CreateTab({
  75.     Name = "settings",
  76. })
  77.  
  78. local Players = game:GetService("Players")
  79. local RunService = game:GetService("RunService")
  80. local UserInputService = game:GetService("UserInputService")
  81. local LocalPlayer = Players.LocalPlayer
  82. local Camera = workspace.CurrentCamera
  83.  
  84. local espEnabled = true
  85. local box2DEnabled = true
  86. local box3DEnabled = false
  87. local cameraEnabled = false
  88. local lockedPlayer = nil
  89.  
  90. local function create2DBox(player)
  91.     local box = Drawing.new("Square")
  92.     box.Thickness = 0.2
  93.     box.Color = Color3.new(1, 1, 1) -- 白色
  94.     box.Filled = false
  95.  
  96.     local shadow = Drawing.new("Square")
  97.     shadow.Thickness = 0.2
  98.     shadow.Color = Color3.new(0, 0, 0) -- 黑色
  99.     shadow.Filled = true
  100.     shadow.Transparency = 0.2 -- 阴影透明度
  101.  
  102.     local connection
  103.     connection = RunService.RenderStepped:Connect(function()
  104.         if espEnabled and box2DEnabled and player.Character and player.Character:FindFirstChild("HumanoidRootPart") then
  105.             local rootPart = player.Character.HumanoidRootPart
  106.             local screenPos, onScreen = workspace.CurrentCamera:WorldToViewportPoint(rootPart.Position)
  107.             if onScreen then
  108.                 local distance = (workspace.CurrentCamera.CFrame.Position - rootPart.Position).Magnitude
  109.                 local fov = workspace.CurrentCamera.FieldOfView
  110.                 local sizeFactor = (175 / distance) * (60 / fov) -- 根据距离和 FOV 调整框的大小
  111.                 box.Size = Vector2.new(sizeFactor * 14, sizeFactor * 24) -- 调整框的大小
  112.                 box.Position = Vector2.new(screenPos.X - box.Size.X / 2, screenPos.Y - box.Size.Y / 2)
  113.                 box.Visible = true
  114.  
  115.                 shadow.Size = box.Size
  116.                 shadow.Position = box.Position + Vector2.new(1, 1) -- 阴影偏移
  117.                 shadow.Visible = true
  118.             else
  119.                 box.Visible = false
  120.                 shadow.Visible = false
  121.             end
  122.         else
  123.             box.Visible = false
  124.             shadow.Visible = false
  125.         end
  126.     end)
  127.  
  128.     return function()
  129.         connection:Disconnect()
  130.         box:Remove()
  131.         shadow:Remove()
  132.     end
  133. end
  134.  
  135. local function create3DBox(player)
  136.     local box = Instance.new("BoxHandleAdornment")
  137.     box.Size = Vector3.new(4, 6, 4) -- 调整框的大小
  138.     box.Color3 = Color3.new(1, 1, 1) -- 白色
  139.     box.Transparency = 0.1
  140.     box.AlwaysOnTop = true
  141.     box.ZIndex = 1
  142.     box.Adornee = player.Character and player.Character:FindFirstChild("HumanoidRootPart")
  143.     box.Parent = workspace
  144.  
  145.     local connection
  146.     connection = RunService.RenderStepped:Connect(function()
  147.         if espEnabled and box3DEnabled and player.Character and player.Character:FindFirstChild("HumanoidRootPart") then
  148.             box.Adornee = player.Character.HumanoidRootPart
  149.             box.Visible = true
  150.         else
  151.             box.Visible = false
  152.         end
  153.     end)
  154.  
  155.     return function()
  156.         connection:Disconnect()
  157.         box:Destroy()
  158.     end
  159. end
  160.  
  161. local espConnections = {}
  162.  
  163. local function onPlayerAdded(player)
  164.     if player ~= LocalPlayer then
  165.         if box2DEnabled then
  166.             espConnections[player] = create2DBox(player)
  167.         elseif box3DEnabled then
  168.             espConnections[player] = create3DBox(player)
  169.         end
  170.     end
  171. end
  172.  
  173. local function onPlayerRemoving(player)
  174.     if espConnections[player] then
  175.         espConnections[player]()
  176.         espConnections[player] = nil
  177.     end
  178. end
  179.  
  180. Players.PlayerAdded:Connect(onPlayerAdded)
  181. Players.PlayerRemoving:Connect(onPlayerRemoving)
  182.  
  183. for _, player in ipairs(Players:GetPlayers()) do
  184.     if player ~= LocalPlayer then
  185.         onPlayerAdded(player)
  186.     end
  187. end
  188.  
  189. espTab:Checkbox({
  190.     Label = "Enable",
  191.     Value = false,
  192.     Callback = function(self, Value)
  193.         espEnabled = Value
  194.         if not espEnabled then
  195.             for _, player in ipairs(Players:GetPlayers()) do
  196.                 if espConnections[player] then
  197.                     espConnections[player]()
  198.                     espConnections[player] = nil
  199.                 end
  200.             end
  201.         else
  202.             for _, player in ipairs(Players:GetPlayers()) do
  203.                 if player ~= LocalPlayer then
  204.                     onPlayerAdded(player)
  205.                 end
  206.             end
  207.         end
  208.     end,
  209. })
  210.  
  211. espTab:Checkbox({
  212.     Label = "2D Box",
  213.     Value = false,
  214.     Callback = function(self, Value)
  215.         box2DEnabled = Value
  216.         if box2DEnabled then
  217.             for _, player in ipairs(Players:GetPlayers()) do
  218.                 if player ~= LocalPlayer then
  219.                     espConnections[player] = create2DBox(player)
  220.                 end
  221.             end
  222.         else
  223.             for _, player in ipairs(Players:GetPlayers()) do
  224.                 if espConnections[player] then
  225.                     espConnections[player]()
  226.                     espConnections[player] = nil
  227.                 end
  228.             end
  229.         end
  230.     end,
  231. })
  232.  
  233.  
  234.  
  235. espTab:Checkbox({
  236.     Label = "3D Box [Beta]",
  237.     Value = false,
  238.     Callback = function(self, Value)
  239.         box3DEnabled = Value
  240.         if box3DEnabled then
  241.             for _, player in ipairs(Players:GetPlayers()) do
  242.                 if player ~= LocalPlayer then
  243.                     espConnections[player] = create3DBox(player)
  244.                 end
  245.             end
  246.         else
  247.             for _, player in ipairs(Players:GetPlayers()) do
  248.                 if espConnections[player] then
  249.                     espConnections[player]()
  250.                     espConnections[player] = nil
  251.                 end
  252.             end
  253.         end
  254.     end,
  255. })
  256.  
  257. aimTab:Separator({
  258.     Text = "AimAssist"
  259. })
  260.  
  261. aimTab:Checkbox({
  262.     Label = "Camera",
  263.     Value = false,
  264.     Callback = function(self, Value)
  265.         cameraEnabled = Value
  266.         if cameraEnabled then
  267.             -- 启用第二个脚本
  268.             local function getClosestPlayer()
  269.                 local closestPlayer = nil
  270.                 local shortestDistance = math.huge
  271.  
  272.                 for _, player in ipairs(Players:GetPlayers()) do
  273.                     if player ~= LocalPlayer and player.Character and player.Character:FindFirstChild("HumanoidRootPart") then
  274.                         local rootPart = player.Character.HumanoidRootPart
  275.                         local screenPos, onScreen = Camera:WorldToViewportPoint(rootPart.Position)
  276.                         if onScreen then
  277.                             local mousePos = UserInputService:GetMouseLocation()
  278.                             local distance = (Vector2.new(screenPos.X, screenPos.Y) - mousePos).Magnitude
  279.                             if distance < shortestDistance then
  280.                                 closestPlayer = player
  281.                                 shortestDistance = distance
  282.                             end
  283.                         end
  284.                     end
  285.                 end
  286.  
  287.                 return closestPlayer
  288.             end
  289.  
  290.             UserInputService.InputBegan:Connect(function(input, gameProcessed)
  291.                 if cameraEnabled and input.KeyCode == key.camera and not gameProcessed then
  292.                     lockedPlayer = getClosestPlayer()
  293.                 end
  294.             end)
  295.  
  296.             UserInputService.InputEnded:Connect(function(input, gameProcessed)
  297.                 if cameraEnabled and input.KeyCode == key.camera and not gameProcessed then
  298.                     lockedPlayer = nil
  299.                 end
  300.             end)
  301.  
  302.             RunService.RenderStepped:Connect(function()
  303.                 if cameraEnabled and lockedPlayer and lockedPlayer.Character and lockedPlayer.Character:FindFirstChild("HumanoidRootPart") then
  304.                     local rootPart = lockedPlayer.Character.Head
  305.                     Camera.CFrame = CFrame.new(Camera.CFrame.Position, rootPart.Position)
  306.                 end
  307.             end)
  308.         else
  309.             -- 禁用第二个脚本
  310.             lockedPlayer = nil
  311.         end
  312.     end
  313. })
  314.  
  315. local Players = game:GetService("Players")
  316. local RunService = game:GetService("RunService")
  317. local UserInputService = game:GetService("UserInputService")
  318. local LocalPlayer = Players.LocalPlayer
  319.  
  320. local lockedPlayer = nil
  321. local mouseEnabled = false
  322.  
  323. local function getClosestPlayer()
  324.     local closestPlayer = nil
  325.     local shortestDistance = math.huge
  326.  
  327.     for _, player in ipairs(Players:GetPlayers()) do
  328.         if player ~= LocalPlayer and player.Character and player.Character:FindFirstChild("HumanoidRootPart") then
  329.             local rootPart = player.Character.HumanoidRootPart
  330.             local mousePos = UserInputService:GetMouseLocation()
  331.             local screenPos, onScreen = workspace.CurrentCamera:WorldToViewportPoint(rootPart.Position)
  332.             if onScreen then
  333.                 local distance = (Vector2.new(screenPos.X, screenPos.Y) - mousePos).Magnitude
  334.                 if distance < shortestDistance then
  335.                     closestPlayer = player
  336.                     shortestDistance = distance
  337.                 end
  338.             end
  339.         end
  340.     end
  341.  
  342.     return closestPlayer
  343. end
  344.  
  345.  
  346. aimTab:Checkbox({
  347.     Label = "Mouse",
  348.     Value = false,
  349.     Callback = function(self, Value)
  350.         mouseEnabled = Value
  351.     end
  352. })
  353.  
  354. local mouseSpeed = 2
  355.  
  356. UserInputService.InputBegan:Connect(function(input, gameProcessed)
  357.     if mouseEnabled and input.KeyCode == key.mouse and not gameProcessed then
  358.         lockedPlayer = getClosestPlayer()
  359.     end
  360. end)
  361.  
  362. UserInputService.InputEnded:Connect(function(input, gameProcessed)
  363.     if mouseEnabled and input.KeyCode == key.mouse and not gameProcessed then
  364.         lockedPlayer = nil
  365.     end
  366. end)
  367.  
  368. RunService.RenderStepped:Connect(function()
  369.     if mouseEnabled and lockedPlayer and lockedPlayer.Character and lockedPlayer.Character:FindFirstChild("HumanoidRootPart") then
  370.         local rootPart = lockedPlayer.Character.Head
  371.         local screenPos = workspace.CurrentCamera:WorldToViewportPoint(rootPart.Position)
  372.         local mousePos = UserInputService:GetMouseLocation()
  373.         local deltaX = (screenPos.X - mousePos.X) * mouseSpeed
  374.         local deltaY = (screenPos.Y - mousePos.Y) * mouseSpeed
  375.         mousemoverel(deltaX, deltaY)
  376.     end
  377. end)
  378.  
  379. aimTab:Checkbox({
  380.     Label = "Silent [soon]",
  381.     Value = false,
  382.     Callback = function(self, Value)
  383.     end
  384. })
  385.  
  386. aimTab:Separator({
  387.     Text = "Fov and Settings:"
  388. })
  389.  
  390. local UserInputService = game:GetService("UserInputService")
  391. local RunService = game:GetService("RunService")
  392.  
  393. local circle = Drawing.new("Circle")
  394. circle.Thickness = 1
  395. circle.Radius = 100
  396. circle.Color = Color3.new(1, 1, 1)
  397. circle.Filled = false
  398. circle.Visible = false
  399.  
  400. aimTab:Checkbox({
  401.     Label = "Fov Enable [soon]",
  402.     Value = false,
  403.     Callback = function(self, Value)
  404.         circle.Visible = Value
  405.     end
  406. })
  407.  
  408. RunService.RenderStepped:Connect(function()
  409.     if circle.Visible then
  410.         local mousePos = UserInputService:GetMouseLocation()
  411.         circle.Position = Vector2.new(mousePos.X, mousePos.Y)
  412.     end
  413. end)
  414.  
  415. aimTab:Slider({
  416.     Label = "FOV",
  417.     Value = 80,
  418.     MinValue = 10,
  419.     MaxValue = 500,
  420.     Callback = function(self, Value)
  421.         circle.Radius = Value
  422.     end
  423. })
  424.  
  425.  
  426. aimTab:Separator({
  427.     Text = "Smoothing"
  428. })
  429.  
  430. aimTab:Slider({
  431.     Label = "Camera",
  432.     Value = 0.1,
  433.     MinValue = 0.1,
  434.     MaxValue = 1,
  435.     Callback = function(self, Value)
  436.         mouseSpeed = Value
  437.     end
  438. })
  439.  
  440. aimTab:Slider({
  441.     Label = "Mouse",
  442.     Value = 0.1,
  443.     MinValue = 0.1,
  444.     MaxValue = 1,
  445.     Callback = function(self, Value)
  446.         mouseSpeed = Value
  447.     end
  448. })
  449.  
  450.  
  451. ------misc
  452. miscTab:Slider({
  453.     Label = "FOV",
  454.     Value = workspace.CurrentCamera.FieldOfView,
  455.     MinValue = 70,
  456.     MaxValue = 120,
  457.     Callback = function(self, Value)
  458.         workspace.CurrentCamera.FieldOfView = Value
  459.         circle.Radius = Value
  460.     end
  461. })
  462.  
  463. local Keybinds = settingsTab:CollapsingHeader({
  464.     Title = "Keybinds"
  465. })
  466.  
  467. Keybinds:Keybind({
  468.     Label = "Toggle UI",
  469.     Value = key.ui,
  470.     Callback = function()
  471.         Window:SetVisible(not Window.Visible)
  472.     end
  473. })
  474.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement