Advertisement
Lean_Man

Cheat GUI

Apr 3rd, 2023
1,150
1
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 21.25 KB | Source Code | 1 0
  1. --[[
  2.     Cheat Gui
  3. ]]
  4.  
  5. Gui_Version = "0.3.5";
  6.  
  7. --/////////////////////////////////////////////////////////////////////////
  8.  
  9. --////Main
  10. --Variables
  11. local camera = workspace.CurrentCamera;
  12. local CoreGui = game:GetService("CoreGui");
  13. local uis = game:GetService("UserInputService");
  14. local run = game:GetService("RunService");
  15. local ReplicatedStorage = game:GetService("ReplicatedStorage");
  16.  
  17. local plyr = game.Players.LocalPlayer;
  18. local mouse = plyr:GetMouse();
  19. local char = plyr.Character or plyr.CharacterAdded:Wait();
  20. local hrp = char:WaitForChild("HumanoidRootPart", math.huge);
  21. local hum = char:WaitForChild("Humanoid", math.huge);
  22.  
  23. --Functions
  24. plyr.CharacterAdded:Connect(function(New_Char)
  25.     char = New_Char;
  26.     hrp = New_Char:WaitForChild("HumanoidRootPart", math.huge);
  27.     hum = New_Char:WaitForChild("Humanoid", math.huge);
  28. end)
  29.  
  30. function FireAll_ClickDetectors()
  31.     for _, v in pairs(workspace:GetDescendants()) do
  32.         if v:IsA("ClickDetector") then
  33.             fireclickdetector(v);
  34.         end
  35.     end
  36. end
  37.  
  38. function FireAll_TouchInterests()
  39.     local root = hrp or char:FindFirstChildOfClass("BasePart");
  40.     local function TI_Touch(x)
  41.         x = x:FindFirstAncestorWhichIsA("Part");
  42.         if x and root then
  43.             task.spawn(function()
  44.                 firetouchinterest(x, root, 1)
  45.                 task.wait();
  46.                 firetouchinterest(x, root, 0)
  47.             end)
  48.         end
  49.     end
  50.     for _, v in pairs(workspace:GetDescendants()) do
  51.         if v:IsA("TouchTransmitter") then
  52.             TI_Touch(v);
  53.         end
  54.     end
  55. end
  56.  
  57. --//Aimbot
  58. local aimbot_conn_1 = nil;
  59. local aimbot_conn_2 = nil;
  60. local aimbot_conn_3 = nil;
  61.  
  62. local aimbot_team_check = false;
  63. local aimbot_radius = 80;
  64. local aimbot_target_part = "Head";
  65. local aimbot_strict_team_check = false;
  66.  
  67. function Aimbot_GetClosestVisiblePlayer()
  68.     local t = nil;
  69.     local OnScreen = {};
  70.     local MaxDistance = math.huge;
  71.     for _, p in ipairs(game.Players:GetPlayers()) do
  72.         if p.UserId ~= plyr.UserId then
  73.             local function aimbot_getplayer_check()
  74.                 local c = p.Character;
  75.                 if c then
  76.                     local r = nil;
  77.                     if aimbot_target_part == "Head" then
  78.                         r = c:FindFirstChild("Head");
  79.                     elseif aimbot_target_part == "Torso" then
  80.                         r = c:FindFirstChild("UpperTorso") or c:FindFirstChild("HumanoidRootPart") or c:FindFirstChild("Torso");
  81.                     end
  82.                     if r then
  83.                         pcall(function()
  84.                             local Visible = camera:WorldToScreenPoint(r.Position);
  85.                             if Visible then
  86.                                 local v1 = Vector2.new(uis:GetMouseLocation().X, uis:GetMouseLocation().Y);
  87.                                 local v2 = Vector2.new(Visible.X, Visible.Y);
  88.                                 local VectorDistace = (v1-v2).Magnitude;
  89.                                 if VectorDistace < aimbot_radius then
  90.                                     table.insert(OnScreen, r);
  91.                                 end
  92.                             end
  93.                         end)
  94.                     end
  95.                 end
  96.             end
  97.             if aimbot_team_check == true then
  98.                 if p.TeamColor ~= plyr.TeamColor then
  99.                     if aimbot_strict_team_check then
  100.                         if p.Team ~= plyr.Team then
  101.                             aimbot_getplayer_check();
  102.                         end
  103.                     else
  104.                         aimbot_getplayer_check();
  105.                     end
  106.                 end
  107.             else
  108.                 aimbot_getplayer_check();
  109.             end
  110.         end
  111.     end
  112.     for _, root in pairs(OnScreen) do
  113.         if hrp and root then
  114.             local Distance = (hrp.Position - root.Position).Magnitude;
  115.             if Distance < MaxDistance then
  116.                 MaxDistance = Distance;
  117.                 t = root;
  118.             end
  119.         end
  120.     end
  121.     return t;
  122. end
  123.  
  124. function ToggleAimbot(E)
  125.     if E then
  126.         local function Aimbot_Activate(e)
  127.             if e then
  128.                 aimbot_conn_1 = run.Heartbeat:Connect(function()
  129.                     task.spawn(function()
  130.                         local ClosestVisiblePart = Aimbot_GetClosestVisiblePlayer();
  131.                         if ClosestVisiblePart then
  132.                             pcall(function()
  133.                                 camera.CFrame = CFrame.new(camera.CFrame.Position, ClosestVisiblePart.Position);
  134.                             end)
  135.                         end
  136.                     end)
  137.                 end)
  138.             else
  139.                 pcall(function()
  140.                     aimbot_conn_1:Disconnect();
  141.                 end)
  142.                 aimbot_conn_1 = nil;
  143.             end
  144.         end
  145.         aimbot_conn_2 = mouse.Button2Down:Connect(function()
  146.             Aimbot_Activate(true);
  147.         end)
  148.         aimbot_conn_3 = mouse.Button2Up:Connect(function()
  149.             Aimbot_Activate(false);
  150.         end)
  151.     else
  152.         pcall(function()
  153.             aimbot_conn_1:Disconnect();
  154.         end)
  155.         aimbot_conn_1 = nil;
  156.         pcall(function()
  157.             aimbot_conn_2:Disconnect();
  158.         end)
  159.         aimbot_conn_2 = nil;
  160.         pcall(function()
  161.             aimbot_conn_3:Disconnect();
  162.         end)
  163.         aimbot_conn_3 = nil;
  164.     end
  165. end
  166. --//
  167.  
  168. --//Esp
  169. local esp_conn_1 = nil;
  170. local esp_conn_2 = nil;
  171. local esp_conn_3 = nil;
  172.  
  173. local esp_transparency = 0.5;
  174. local esp_blacklist_team = false;
  175. local esp_enabled = false;
  176. local esp_strict_team_blacklist = false;
  177.  
  178. function esp_update_esp_t()
  179.     for _, v in pairs(CoreGui:GetChildren()) do
  180.         if string.find(v.Name, "_ESP") and v:IsA("Folder") then
  181.             for _, v in pairs(v:GetChildren()) do
  182.                 if v:IsA("BoxHandleAdornment") then
  183.                     v.Transparency = esp_transparency;
  184.                 end
  185.             end
  186.         end
  187.     end
  188. end
  189.  
  190. function esp_update_esp_b(toggle_main)
  191.     for _, v in pairs(game.Players:GetPlayers()) do
  192.         if v ~= plyr then
  193.             local function esp_update_start(toggle)
  194.                 local folder = CoreGui:FindFirstChild(v.Name.."_ESP");
  195.                 if toggle then
  196.                     if folder then
  197.                         for _, t in pairs(folder:GetChildren()) do
  198.                             if t:IsA("BoxHandleAdornment") then
  199.                                 t:Destroy();
  200.                             end
  201.                         end
  202.                     end
  203.                 else
  204.                     if not folder then
  205.                         folder = Instance.new("Folder", CoreGui);
  206.                         folder.Name = v.Name.."_ESP";
  207.                     end
  208.                     if folder and #folder:GetChildren() <= 0 then
  209.                         if esp_enabled then
  210.                             local v_char = v.Character;
  211.                             if v_char then
  212.                                 for _, t in pairs(v_char:GetChildren()) do
  213.                                     if t:IsA("BasePart") then
  214.                                         local bha = Instance.new("BoxHandleAdornment", folder);
  215.                                         bha.Adornee = t;
  216.                                         bha.Size = t.Size;
  217.                                         bha.ZIndex = 10;
  218.                                         bha.Transparency = esp_transparency;
  219.                                         bha.AlwaysOnTop = true;
  220.                                         bha.Color = v.TeamColor;
  221.                                     end
  222.                                 end
  223.                             end
  224.                         end
  225.                     end
  226.                 end
  227.             end
  228.             if toggle_main then
  229.                 if (v.TeamColor ~= plyr.TeamColor) then
  230.                     if (esp_strict_team_blacklist == true) then
  231.                         if (v.Team ~= plyr.Team) then
  232.                             esp_update_start(false);
  233.                         else
  234.                             esp_update_start(true);
  235.                         end
  236.                     else
  237.                         esp_update_start(false);
  238.                     end
  239.                 else
  240.                     esp_update_start(true);
  241.                 end
  242.             else
  243.                 esp_update_start(false);
  244.             end
  245.         end
  246.     end
  247. end
  248.  
  249. function ToggleEsp(toggle)
  250.     if toggle then
  251.         local function Esp_PlayerFound(p)
  252.             local esp_char_conn1 = nil;
  253.             local esp_char_conn2 = nil;
  254.             local esp_plyr_conn1 = nil;
  255.             local folder = CoreGui:FindFirstChild(p.Name.."_ESP");
  256.             if not folder then
  257.                 folder = Instance.new("Folder", CoreGui);
  258.                 folder.Name = p.Name.."_ESP";
  259.             end
  260.             if p ~= plyr then
  261.                 local function esp_disconnect_functions()
  262.                     pcall(function()
  263.                         esp_char_conn1:Disconnect();
  264.                         esp_char_conn2:Disconnect();
  265.                         esp_plyr_conn1:Disconnect();
  266.                     end)
  267.                     esp_char_conn1 = nil;
  268.                     esp_char_conn2 = nil;
  269.                     esp_plyr_conn1 = nil;
  270.                 end
  271.                 local function Esp_CharFound(c)
  272.                     if not toggle then
  273.                         esp_disconnect_functions();
  274.                         return;
  275.                     end
  276.                     if esp_blacklist_team == true then
  277.                         if (p.TeamColor == plyr.TeamColor) then
  278.                             if esp_strict_team_blacklist == true then
  279.                                 if (p.Team == plyr.Team) then
  280.                                     return;
  281.                                 end
  282.                             else
  283.                                 return;
  284.                             end
  285.                         end
  286.                     end
  287.                     task.spawn(function()
  288.                         task.wait();
  289.                         for _, v in pairs(c:GetChildren()) do
  290.                             if v:IsA("BasePart") then
  291.                                 local bha = Instance.new("BoxHandleAdornment", folder);
  292.                                 bha.Adornee = v;
  293.                                 bha.Size = v.Size;
  294.                                 bha.ZIndex = 10;
  295.                                 bha.Transparency = esp_transparency;
  296.                                 bha.AlwaysOnTop = true;
  297.                                 bha.Color = p.TeamColor;
  298.                             end
  299.                         end
  300.                     end)
  301.                     esp_char_conn2 = c.ChildAdded:Connect(function(child)
  302.                         if child:IsA("BasePart") then
  303.                             if folder then
  304.                                 local bha = Instance.new("BoxHandleAdornment", folder);
  305.                                 bha.Adornee = child;
  306.                                 bha.Size = child.Size;
  307.                                 bha.ZIndex = 10;
  308.                                 bha.Transparency = esp_transparency;
  309.                                 bha.AlwaysOnTop = true;
  310.                                 bha.Color = p.TeamColor;
  311.                             end
  312.                         end
  313.                     end)
  314.                 end
  315.                 if p.Character then
  316.                     Esp_CharFound(p.Character);
  317.                 end
  318.                 esp_char_conn1 = p.CharacterAdded:Connect(Esp_CharFound);
  319.                 esp_plyr_conn1 = p.Changed:Connect(function(property)
  320.                     if property == "TeamColor" then
  321.                         if folder then
  322.                             for _, v in pairs(folder:GetChildren()) do
  323.                                 if v:IsA("BoxHandleAdornment") then
  324.                                     v.Color = p.TeamColor;
  325.                                 end
  326.                             end
  327.                         end
  328.                     end
  329.                     if property == "Team" then
  330.                         if folder then
  331.                             for _, v in pairs(folder:GetChildren()) do
  332.                                 if v:IsA("BoxHandleAdornment") then
  333.                                     v.Color = p.TeamColor;
  334.                                 end
  335.                             end
  336.                         end
  337.                         esp_update_esp_b(esp_blacklist_team);
  338.                     end
  339.                 end)
  340.             end
  341.         end
  342.         for _, v in pairs(game.Players:GetPlayers()) do
  343.             Esp_PlayerFound(v);
  344.         end
  345.         esp_conn_1 = game.Players.PlayerAdded:Connect(function(plyr)
  346.             Esp_PlayerFound(plyr);
  347.         end)
  348.         esp_conn_2 = game.Players.PlayerRemoving:Connect(function(p)
  349.             local gui_found = CoreGui:FindFirstChild(p.Name.."_ESP");
  350.             if gui_found then
  351.                 gui_found:Destroy();
  352.             end
  353.         end)
  354.         esp_conn_3 = plyr.Changed:Connect(function(property)
  355.             if property == "Team" or property == "TeamColor" then
  356.                 ToggleEsp(false);
  357.                 task.wait();
  358.                 if esp_enabled == true then
  359.                     ToggleEsp(true);
  360.                 end
  361.             end
  362.         end)
  363.     else
  364.         pcall(function()
  365.             esp_conn_1:Disconnect();
  366.         end)
  367.         esp_conn_1 = nil;
  368.         pcall(function()
  369.             esp_conn_2:Disconnect();
  370.         end)
  371.         esp_conn_2 = nil;
  372.         pcall(function()
  373.             esp_conn_3:Disconnect();
  374.         end)
  375.         esp_conn_3 = nil;
  376.         for _, v in pairs(CoreGui:GetChildren()) do
  377.             if string.find(v.Name, "_ESP") and v:IsA("Folder") then
  378.                 v:Destroy();
  379.             end
  380.         end
  381.     end
  382. end
  383. --//
  384.  
  385. --//Inf Jump
  386. local inf_jump_conn1 = nil;
  387. local inf_jump_conn2 = nil;
  388.  
  389. local inf_jump_can_jump = true;
  390.  
  391. function ToggleInfJump(toggle)
  392.     if toggle then
  393.         inf_jump_conn1 = uis.JumpRequest:Connect(function()
  394.             if (hum) and (hum.Health > 0) and (inf_jump_can_jump == true) then
  395.                 hum:ChangeState(Enum.HumanoidStateType.Jumping);
  396.                 inf_jump_can_jump = false;
  397.             end
  398.         end)
  399.         inf_jump_conn2 = uis.InputEnded:Connect(function(input, _)
  400.             if input.KeyCode == Enum.KeyCode.Space then
  401.                 inf_jump_can_jump = true;
  402.             end
  403.         end)
  404.     else
  405.         pcall(function()
  406.             inf_jump_conn1:Disconnect();
  407.         end)
  408.         inf_jump_conn1 = nil;
  409.         pcall(function()
  410.             inf_jump_conn2:Disconnect();
  411.         end)
  412.         inf_jump_conn2 = nil;
  413.     end
  414. end
  415. --//
  416. --////
  417.  
  418. --////GUI
  419. local OrionLib = loadstring(game:HttpGet(('https://raw.githubusercontent.com/shlexware/Orion/main/source')))();
  420.  
  421. local Window1 = OrionLib:MakeWindow({
  422.     Name = "Cheat GUI";
  423.     HidePremium = false,
  424.     SaveConfig = false,
  425.     ConfigFolder = "Orion_Gui",
  426.     IntroText = "Cheats"
  427. })
  428.  
  429. --Functions
  430. function Gui_Notify(title, content, time)
  431.     OrionLib:MakeNotification({
  432.         Name = title,
  433.         Content = content,
  434.         Image = "rbxassetid://4483345998",
  435.         Time = time
  436.     })
  437. end
  438.  
  439. --Tabs
  440. local Tab0 = Window1:MakeTab({
  441.     Name = "About",
  442.     Icon = "rbxassetid://4483345998",
  443.     PremiumOnly = false
  444. })
  445.  
  446. local Tab1 = Window1:MakeTab({
  447.     Name = "Player",
  448.     Icon = "rbxassetid://4483345998",
  449.     PremiumOnly = false
  450. })
  451.  
  452. local Tab2 = Window1:MakeTab({
  453.     Name = "Esp",
  454.     Icon = "rbxassetid://4483345998",
  455.     PremiumOnly = false
  456. })
  457.  
  458. local Tab3 = Window1:MakeTab({
  459.     Name = "Aimbot",
  460.     Icon = "rbxassetid://4483345998",
  461.     PremiumOnly = false
  462. })
  463.  
  464. local Tab4 = Window1:MakeTab({
  465.     Name = "Game",
  466.     Icon = "rbxassetid://4483345998",
  467.     PremiumOnly = false
  468. })
  469.  
  470. --Tab 0
  471. Tab0:AddLabel("Version: "..Gui_Version);
  472.  
  473. Tab0:AddButton({
  474.     Name = "Destroy Gui",
  475.     Callback = function()
  476.         OrionLib:Destroy();
  477.     end    
  478. })
  479.  
  480. --Tab 1
  481. local Default_Disable = false;
  482. Tab1:AddSlider({
  483.     Name = "Walk Speed",
  484.     Min = 0,
  485.     Max = 500,
  486.     Default = 16,
  487.     Color = Color3.fromRGB(150,150,150),
  488.     Increment = 1,
  489.     ValueName = "Speed",
  490.     Callback = function(Value)
  491.         if Default_Disable == false then
  492.             Default_Disable = true;
  493.             return;
  494.         end
  495.         if (hum) and hum.Health > 0 then
  496.             --(function()
  497.                 hum.WalkSpeed = Value;
  498.             --end)
  499.         end
  500.     end    
  501. })
  502.  
  503. local Default_Disable = false;
  504. Tab1:AddSlider({
  505.     Name = "Jump Height",
  506.     Min = 0,
  507.     Max = 500,
  508.     Default = 50,
  509.     Color = Color3.fromRGB(150,150,150),
  510.     Increment = 1,
  511.     ValueName = "Height",
  512.     Callback = function(Value)
  513.         if Default_Disable == false then
  514.             Default_Disable = true;
  515.             return;
  516.         end
  517.         if (hum) and hum.Health > 0 then
  518.             pcall(function()
  519.                 hum.JumpPower = Value;
  520.             end)
  521.         end
  522.     end    
  523. })
  524.  
  525. local Default_Disable = false;
  526. Tab1:AddToggle({
  527.     Name = "Inf Jump",
  528.     Default = false,
  529.     Callback = function(Value)
  530.         if Default_Disable == false then
  531.             Default_Disable = true;
  532.             return;
  533.         end
  534.         ToggleInfJump(Value);
  535.     end    
  536. })
  537.  
  538. --Tab 2
  539. local Default_Disable = false;
  540. Tab2:AddToggle({
  541.     Name = "Esp",
  542.     Default = false,
  543.     Callback = function(Value)
  544.         if Default_Disable == false then
  545.             Default_Disable = true;
  546.             return;
  547.         end
  548.         esp_enabled = Value;
  549.         ToggleEsp(Value);
  550.     end    
  551. })
  552.  
  553. Tab2:AddLabel("Settings");
  554.  
  555. local Default_Disable = false;
  556. Tab2:AddToggle({
  557.     Name = "Blacklist Team",
  558.     Default = false,
  559.     Callback = function(Value)
  560.         if Default_Disable == false then
  561.             Default_Disable = true;
  562.             return;
  563.         end
  564.         esp_blacklist_team = Value;
  565.         esp_update_esp_b(Value);
  566.     end
  567. })
  568.  
  569. local Default_Disable = false;
  570. Tab2:AddToggle({
  571.     Name = "Strict Blacklist Team (Use With Blacklist Team)",
  572.     Default = false,
  573.     Callback = function(Value)
  574.         if Default_Disable == false then
  575.             Default_Disable = true;
  576.             return;
  577.         end
  578.         esp_strict_team_blacklist = Value;
  579.     end
  580. })
  581.  
  582. local Default_Disable = false;
  583. Tab2:AddSlider({
  584.     Name = "Esp Box Transparency",
  585.     Min = 0,
  586.     Max = 1,
  587.     Default = 0.5,
  588.     Color = Color3.fromRGB(150,150,150),
  589.     Increment = 0.1,
  590.     ValueName = "Transparency",
  591.     Callback = function(Value)
  592.         if Default_Disable == false then
  593.             Default_Disable = true;
  594.             return;
  595.         end
  596.         esp_transparency = Value;
  597.         esp_update_esp_t();
  598.     end    
  599. })
  600.  
  601. --Tab 3
  602. local Default_Disable = false;
  603. Tab3:AddToggle({
  604.     Name = "Aimbot",
  605.     Default = false,
  606.     Callback = function(Value)
  607.         if Default_Disable == false then
  608.             Default_Disable = true;
  609.             return;
  610.         end
  611.         ToggleAimbot(Value);
  612.     end
  613. })
  614.  
  615. Tab3:AddLabel("Settings");
  616.  
  617. local Default_Disable = false;
  618. Tab3:AddToggle({
  619.     Name = "Team Check",
  620.     Default = false,
  621.     Callback = function(Value)
  622.         if Default_Disable == false then
  623.             Default_Disable = true;
  624.             return;
  625.         end
  626.         aimbot_team_check = Value;
  627.     end
  628. })
  629.  
  630. local Default_Disable = false;
  631. Tab3:AddToggle({
  632.     Name = "Strict Team Check (Use With Team Check)",
  633.     Default = false,
  634.     Callback = function(Value)
  635.         if Default_Disable == false then
  636.             Default_Disable = true;
  637.             return;
  638.         end
  639.         aimbot_strict_team_check = Value;
  640.     end
  641. })
  642.  
  643. local Default_Disable = false;
  644. Tab3:AddSlider({
  645.     Name = "Check Radius Around Mouse",
  646.     Min = 0,
  647.     Max = 500,
  648.     Default = 80,
  649.     Color = Color3.fromRGB(150,150,150),
  650.     Increment = 5,
  651.     ValueName = "Pixels",
  652.     Callback = function(Value)
  653.         if Default_Disable == false then
  654.             Default_Disable = true;
  655.             return;
  656.         end
  657.         aimbot_radius = Value;
  658.     end    
  659. })
  660.  
  661. local Default_Disable = false;
  662. Tab3:AddDropdown({
  663.     Name = "Target Part",
  664.     Default = "Head",
  665.     Options = {"Head", "Torso"},
  666.     Callback = function(Value)
  667.         if Default_Disable == false then
  668.             Default_Disable = true;
  669.             return;
  670.         end
  671.         aimbot_target_part = tostring(Value);
  672.     end    
  673. })
  674.  
  675. --Tab 4
  676. Tab4:AddTextbox({
  677.     Name = "Chat Message (Undetectable)",
  678.     Default = "Enter Message Here",
  679.     TextDisappear = true,
  680.     Callback = function(Value)
  681.         local event1 = ReplicatedStorage:FindFirstChild("DefaultChatSystemChatEvents");
  682.         if event1 then
  683.             local event2 = event1:FindFirstChild("SayMessageRequest");
  684.             if event2 then
  685.                 local args = {[1] = Value, [2] = "All"};
  686.                 event2:FireServer(unpack(args));
  687.             end
  688.         end
  689.     end  
  690. })
  691.  
  692. Tab4:AddButton({
  693.     Name = "Fire All Click Detectors",
  694.     Callback = function()
  695.         if (fireclickdetector) then
  696.             FireAll_ClickDetectors();
  697.         else
  698.             Gui_Notify("ERROR", "Your exploit is incompatible!", 5);
  699.         end
  700.     end
  701. })
  702.  
  703. Tab4:AddButton({
  704.     Name = "Fire All Touch Interests",
  705.     Callback = function()
  706.         if (fireclickdetector) then
  707.             FireAll_TouchInterests();
  708.         else
  709.             Gui_Notify("ERROR", "Your exploit is incompatible!", 5);
  710.         end
  711.     end    
  712. })
  713. local Default_Disable = true;
  714. OrionLib:Init()
  715. --////
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement