Advertisement
jenitho

SkipperHub v3

Apr 7th, 2025
236
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 43.28 KB | Gaming | 0 0
  1. --SkipperHub!!!
  2.  
  3. local Rayfield = loadstring(game:HttpGet('https://sirius.menu/rayfield'))()
  4.  
  5. local Window = Rayfield:CreateWindow({
  6.    Name = "💫Skippers Mod Menu💫 | Free",
  7.    Icon = 0, -- Icon in Topbar. Can use Lucide Icons (string) or Roblox Image (number). 0 to use no icon (default).
  8.    LoadingTitle = "Free v3",
  9.    LoadingSubtitle = "by Skipper",
  10.    Theme = "Default", -- Check https://docs.sirius.menu/rayfield/configuration/themes
  11.  
  12.    DisableRayfieldPrompts = false,
  13.    DisableBuildWarnings = false, -- Prevents Rayfield from warning when the script has a version mismatch with the interface
  14.  
  15.    ConfigurationSaving = {
  16.       Enabled = true,
  17.       FolderName = nil, -- Create a custom folder for your hub/game
  18.       FileName = "Big Hub"
  19.    },
  20.  
  21.    Discord = {
  22.       Enabled = false, -- Prompt the user to join your Discord server if their executor supports it
  23.       Invite = "noinvitelink", -- The Discord invite code, do not include discord.gg/. E.g. discord.gg/ ABCD would be ABCD
  24.       RememberJoins = true -- Set this to false to make them join the discord every time they load it up
  25.    },
  26.  
  27.    KeySystem = true, -- Set this to true to use our key system
  28.    KeySettings = {
  29.       Title = "Skipper Mod Menu | Free",
  30.       Subtitle = "Key System",
  31.       Note = "Key System even tho it´s Free | In Discord!", -- Use this to tell the user how to get a key
  32.       FileName = "Key", -- It is recommended to use something unique as other scripts using Rayfield may overwrite your key file
  33.       SaveKey = false, -- The user's key will be saved, but if you change the key, they will be unable to use your script
  34.       GrabKeyFromSite = true, -- If this is true, set Key below to the RAW site you would like Rayfield to get the key from
  35.       Key = {"GUI"} -- List of keys that will be accepted by the system, can be RAW file links (pastebin, github etc) or simple strings ("hello","key22")
  36.    }
  37. })
  38.  
  39.  
  40. Rayfield:Notify({
  41.    Title = "Thanks for using our Script!",
  42.    Content = "have fun!",
  43.    Duration = 10,
  44.    Image = 4483362458,
  45. })
  46.  
  47. local ESPTab = Window:CreateTab("🟥Esp Opptions🟥", 4483362458) -- Title, Image
  48. local ESPSection = ESPTab:CreateSection("🟥ESP🟥")
  49.  
  50.  
  51. local AIMTab = Window:CreateTab("🔫Aim Oppitions🔫", 4483362458) -- Title, Image
  52. local AIMSection = AIMTab:CreateSection("🔫Aimbot")
  53.  
  54.  
  55. local STUFFTab = Window:CreateTab("➕Other Stuff➕", 4483362458) -- Title, Image
  56. local STUFFSection = STUFFTab:CreateSection("➕Stuff➕")
  57.  
  58.  
  59. local ScrTab = Window:CreateTab("☁️Scripthubs Opptions☁️", 4483362458) -- Title, Image
  60. local ScrSection = ScrTab:CreateSection("☁️Hubs☁️")
  61.  
  62.  
  63. local DISTab = Window:CreateTab("✨Discord✨", 4483362458) -- Title, Image
  64. local DISSection = DISTab:CreateSection("✨https://discord.gg/mDnAFVs8✨")
  65.  
  66.  
  67.    
  68. local Button = ESPTab:CreateButton({
  69.    Name = "🔴Tracer (Everyone)🔴",
  70.    Callback = function()
  71.    -- LocalScript in StarterPlayer > StarterPlayerScripts
  72.  
  73. local Players = game:GetService("Players")
  74. local RunService = game:GetService("RunService")
  75. local localPlayer = Players.LocalPlayer
  76.  
  77. -- Tracer-Einstellungen
  78. local function createTracer()
  79.     local tracer = Drawing.new("Line")
  80.     tracer.Color = Color3.fromRGB(225,27,27)
  81.     tracer.Thickness = 1.5
  82.     tracer.Transparency = 1
  83.     tracer.Visible = true
  84.     return tracer
  85. end
  86.  
  87. -- Spieler ESP hinzufügen (Highlight + Tracer)
  88. local trackedPlayers = {}
  89.  
  90. local function addESP(targetPlayer)
  91.     if targetPlayer == localPlayer then return end
  92.  
  93.     local function onCharacterAdded(character)
  94.         -- Highlight hinzufügen
  95.         local highlight = Instance.new("Highlight")
  96.         highlight.FillColor = Color3.fromRGB(0, 255, 0)
  97.         highlight.FillTransparency = 0.5
  98.         highlight.OutlineTransparency = 1
  99.         highlight.Adornee = character
  100.         highlight.Parent = character
  101.  
  102.         -- Tracer erstellen
  103.         local tracer = createTracer()
  104.         trackedPlayers[targetPlayer] = {
  105.             character = character,
  106.             tracer = tracer
  107.         }
  108.     end
  109.  
  110.     if targetPlayer.Character then
  111.         onCharacterAdded(targetPlayer.Character)
  112.     end
  113.  
  114.     targetPlayer.CharacterAdded:Connect(onCharacterAdded)
  115. end
  116.  
  117. -- Alle bestehenden Spieler tracken
  118. for _, player in pairs(Players:GetPlayers()) do
  119.     addESP(player)
  120. end
  121.  
  122. -- Neue Spieler tracken
  123. Players.PlayerAdded:Connect(function(player)
  124.     addESP(player)
  125. end)
  126.  
  127. -- Update Tracers jedes Frame
  128. RunService.RenderStepped:Connect(function()
  129.     for player, data in pairs(trackedPlayers) do
  130.         local character = data.character
  131.         local tracer = data.tracer
  132.  
  133.         if character and character:FindFirstChild("HumanoidRootPart") then
  134.             local hrp = character.HumanoidRootPart
  135.             local screenPos, onScreen = workspace.CurrentCamera:WorldToViewportPoint(hrp.Position)
  136.             if onScreen then
  137.                 local bottomOfScreen = Vector2.new(workspace.CurrentCamera.ViewportSize.X / 2, workspace.CurrentCamera.ViewportSize.Y)
  138.                 tracer.From = bottomOfScreen
  139.                 tracer.To = Vector2.new(screenPos.X, screenPos.Y)
  140.                 tracer.Visible = true
  141.             else
  142.                 tracer.Visible = false
  143.             end
  144.         else
  145.             tracer.Visible = false
  146.         end
  147.     end
  148. end)
  149.    end,
  150. })
  151.  
  152.  
  153. local Button = ScrTab:CreateButton({
  154.    Name = "☁️Infinity Yield☁️",
  155.    Callback = function()
  156.    loadstring(game:HttpGet('https://raw.githubusercontent.com/EdgeIY/infiniteyield/master/source'))()
  157.    end,
  158. })
  159.  
  160.  
  161. local Button = ScrTab:CreateButton({
  162.    Name = "☁️Solara Hub v3☁️",
  163.    Callback = function()
  164.    loadstring(game:HttpGet("https://raw.githubusercontent.com/samuraa1/Solara-Hub/refs/heads/main/Solara%20Hub.lua"))()
  165.    end,
  166. })
  167.  
  168.  
  169. local Button = ScrTab:CreateButton({
  170.    Name = "☁️Chat Troller☁️ (Patched)",
  171.    Callback = function()
  172.    loadstring(game:HttpGet('https://raw.githubusercontent.com/ffedex/characters/refs/heads/main/chars', true))()
  173.    end,
  174. })
  175.  
  176.  
  177. local Button = STUFFTab:CreateButton({
  178.    Name = "✖️Walkspeed✖️",
  179.    Callback = function()
  180.     local Player = game.Players.LocalPlayer
  181. local UIS = game:GetService("UserInputService")
  182. local TweenService = game:GetService("TweenService")
  183. local CharacterAdded = Player.CharacterAdded
  184.  
  185. local function createUI()
  186.     local Character = Player.Character or Player.CharacterAdded:Wait()
  187.     local Humanoid = Character:WaitForChild("Humanoid")
  188.    
  189.     -- Create the GUI elements
  190.     local ScreenGui = Instance.new("ScreenGui")
  191.     ScreenGui.Parent = Player:WaitForChild("PlayerGui")
  192.     ScreenGui.Name = "WalkSpeedGUI"
  193.  
  194.     -- Create the frame for the slider
  195.     local Frame = Instance.new("Frame")
  196.     Frame.Size = UDim2.new(0, 420, 0, 120)
  197.     Frame.Position = UDim2.new(0.5, -210, 0.8, -60)
  198.     Frame.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
  199.     Frame.BackgroundTransparency = 0.5
  200.     Frame.BorderSizePixel = 0
  201.     Frame.Parent = ScreenGui
  202.     -- Add rounded corners to the frame
  203.     local UICorner = Instance.new("UICorner")
  204.     UICorner.CornerRadius = UDim.new(0, 16)
  205.     UICorner.Parent = Frame
  206.  
  207.     -- Create the title text
  208.     local Title = Instance.new("TextLabel")
  209.     Title.Size = UDim2.new(1, 0, 0, 30)
  210.     Title.Text = "WalkSpeed Slider"
  211.     Title.TextColor3 = Color3.fromRGB(255, 255, 255)
  212.     Title.TextSize = 22
  213.     Title.Font = Enum.Font.GothamBold
  214.     Title.TextStrokeTransparency = 0.8
  215.     Title.TextStrokeColor3 = Color3.fromRGB(0, 0, 0)
  216.     Title.BackgroundTransparency = 1
  217.     Title.Parent = Frame
  218.  
  219.     -- Create the slider container
  220.     local Slider = Instance.new("Frame")
  221.     Slider.Size = UDim2.new(1, -40, 0, 10)
  222.     Slider.Position = UDim2.new(0, 20, 0, 50)
  223.     Slider.BackgroundColor3 = Color3.fromRGB(100, 100, 100)
  224.     Slider.BorderSizePixel = 0
  225.     Slider.Parent = Frame
  226.     -- Add rounded corners to the slider container
  227.     local SliderCorner = Instance.new("UICorner")
  228.     SliderCorner.CornerRadius = UDim.new(0, 5)
  229.     SliderCorner.Parent = Slider
  230.  
  231.     -- Create the slider button
  232.     local SliderButton = Instance.new("Frame")
  233.     SliderButton.Size = UDim2.new(0, 20, 1, 0)
  234.     SliderButton.BackgroundColor3 = Color3.fromRGB(0, 255, 0)
  235.     SliderButton.BorderSizePixel = 0
  236.     SliderButton.Parent = Slider
  237.     -- Add rounded corners to the slider button
  238.     local SliderButtonCorner = Instance.new("UICorner")
  239.     SliderButtonCorner.CornerRadius = UDim.new(0, 10)
  240.     SliderButtonCorner.Parent = SliderButton
  241.  
  242.     -- Create gradient effect for the slider button
  243.     local Gradient = Instance.new("UIGradient")
  244.     Gradient.Rotation = 45
  245.     Gradient.Color = ColorSequence.new({
  246.         ColorSequenceKeypoint.new(0, Color3.fromRGB(0, 255, 0)),
  247.         ColorSequenceKeypoint.new(1, Color3.fromRGB(0, 200, 0))
  248.     })
  249.     Gradient.Parent = SliderButton
  250.  
  251.     -- Function to update walkspeed based on slider position
  252.     local function updateWalkSpeed()
  253.         -- Get the X position of the slider button
  254.         local sliderPosition = SliderButton.Position.X.Offset / Slider.AbsoluteSize.X
  255.         -- Debugging: Print the slider position and walk speed
  256.         print("Slider Position:", sliderPosition)
  257.         -- Ensure the walk speed is within a reasonable range, clamp it between 16 and 500
  258.         Humanoid.WalkSpeed = math.clamp(sliderPosition * 500, 16, 500)
  259.         print("Updated WalkSpeed:", Humanoid.WalkSpeed)
  260.     end
  261.  
  262.     -- Dragging logic
  263.     local dragging = false
  264.     local mouse = Player:GetMouse()
  265.  
  266.     SliderButton.InputBegan:Connect(function(input)
  267.         if input.UserInputType == Enum.UserInputType.MouseButton1 then
  268.             dragging = true
  269.         end
  270.     end)
  271.  
  272.     SliderButton.InputEnded:Connect(function(input)
  273.         if input.UserInputType == Enum.UserInputType.MouseButton1 then
  274.             dragging = false
  275.         end
  276.     end)
  277.  
  278.     UIS.InputChanged:Connect(function(input)
  279.         if dragging and input.UserInputType == Enum.UserInputType.MouseMovement then
  280.             -- Calculate the new position of the slider button based on the mouse's X position
  281.             local sliderWidth = Slider.AbsoluteSize.X
  282.             local newX = math.clamp(mouse.X - Slider.AbsolutePosition.X, 0, sliderWidth)
  283.             -- Set the slider button position with a smooth tween effect
  284.             TweenService:Create(SliderButton, TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {Position = UDim2.new(0, newX, 0, 0)}):Play()
  285.             -- Update WalkSpeed continuously as the button is moved
  286.             updateWalkSpeed()
  287.         end
  288.     end)
  289.  
  290.     -- Initial walk speed setup
  291.     updateWalkSpeed()
  292. end
  293.  
  294. -- Recreate UI every time the player respawns
  295. CharacterAdded:Connect(function()
  296.     -- Clean up any existing UI if it exists
  297.     if Player:FindFirstChild("PlayerGui") and Player.PlayerGui:FindFirstChild("WalkSpeedGUI") then
  298.         Player.PlayerGui:FindFirstChild("WalkSpeedGUI"):Destroy()
  299.     end
  300.     -- Create a new UI after respawn
  301.     createUI()
  302. end)
  303.  
  304. -- Create the UI for the first time
  305. createUI()
  306.    
  307.    end,
  308. })
  309.  
  310. local Button = STUFFTab:CreateButton({
  311.    Name = "✖️Jump Power✖️",
  312.    Callback = function()
  313.    local player = game.Players.LocalPlayer
  314. local character = player.Character or player.CharacterAdded:Wait()
  315. local humanoid = character:WaitForChild("Humanoid")
  316.  
  317. -- Ensure humanoid updates on respawn
  318. player.CharacterAdded:Connect(function(newCharacter)
  319.     character = newCharacter
  320.     humanoid = newCharacter:WaitForChild("Humanoid")
  321. end)
  322.  
  323. -- Create UI
  324. local screenGui = Instance.new("ScreenGui")
  325. screenGui.Parent = player:WaitForChild("PlayerGui")
  326.  
  327. local frame = Instance.new("Frame")
  328. frame.Size = UDim2.new(0, 200, 0, 50)
  329. frame.Position = UDim2.new(0.5, -100, 0.1, 0)
  330. frame.BackgroundColor3 = Color3.fromRGB(50, 50, 50) -- Dark grey
  331. frame.BorderSizePixel = 0
  332. frame.Active = true -- Needed for dragging
  333. frame.Draggable = true -- Makes the frame draggable
  334. frame.Parent = screenGui
  335.  
  336. -- Rounded Edges
  337. local uiCorner = Instance.new("UICorner")
  338. uiCorner.CornerRadius = UDim.new(0.2, 0)
  339. uiCorner.Parent = frame
  340.  
  341. local label = Instance.new("TextLabel")
  342. label.Text = "Jump Power:"
  343. label.Size = UDim2.new(0, 100, 1, 0)
  344. label.Position = UDim2.new(0, 5, 0, 0)
  345. label.BackgroundTransparency = 1
  346. label.TextColor3 = Color3.new(1, 1, 1) -- White
  347. label.TextScaled = true
  348. label.Font = Enum.Font.SourceSans
  349. label.Parent = frame
  350.  
  351. local textBox = Instance.new("TextBox")
  352. textBox.Size = UDim2.new(0, 80, 0.8, 0)
  353. textBox.Position = UDim2.new(1, -85, 0.1, 0)
  354. textBox.BackgroundColor3 = Color3.fromRGB(30, 30, 30) -- Slightly darker grey
  355. textBox.TextColor3 = Color3.new(1, 1, 1)
  356. textBox.Text = "" -- Starts empty
  357. textBox.TextScaled = true
  358. textBox.Font = Enum.Font.SourceSans
  359. textBox.Parent = frame
  360.  
  361. local uiCorner2 = Instance.new("UICorner")
  362. uiCorner2.CornerRadius = UDim.new(0.2, 0)
  363. uiCorner2.Parent = textBox
  364.  
  365. -- Default Jump Power
  366. local defaultJumpPower = humanoid.JumpPower
  367.  
  368. -- Update Jump Power
  369. textBox.FocusLost:Connect(function(enterPressed)
  370.     if enterPressed then
  371.         local newJumpPower = tonumber(textBox.Text)
  372.         if newJumpPower and newJumpPower > 0 then
  373.             humanoid.JumpPower = newJumpPower
  374.         else
  375.             textBox.Text = ""
  376.             humanoid.JumpPower = defaultJumpPower -- Reset to default
  377.         end
  378.     end
  379. end)
  380.    end,
  381. })
  382.  
  383.  
  384. local Button = STUFFTab:CreateButton({
  385.    Name = "➕Fling➕",
  386.    Callback = function()
  387.    local Players = game:GetService("Players")
  388. local Player = Players.LocalPlayer
  389.  
  390. local ScreenGui = Instance.new("ScreenGui")
  391. local Frame = Instance.new("Frame")
  392. local TextBox = Instance.new("TextBox")
  393. local TextButton = Instance.new("TextButton")
  394. local CloseButton = Instance.new("TextButton") -- Close button
  395.  
  396. ScreenGui.Parent = Player:WaitForChild("PlayerGui")
  397. ScreenGui.ResetOnSpawn = false
  398.  
  399. Frame.Parent = ScreenGui
  400. Frame.BackgroundColor3 = Color3.fromRGB(33, 33, 33)
  401. Frame.Position = UDim2.new(0.5, -100, 0.5, -50)
  402. Frame.Size = UDim2.new(0, 200, 0, 100)
  403. Frame.Active = true
  404. Frame.Draggable = true
  405.  
  406. TextBox.Parent = Frame
  407. TextBox.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  408. TextBox.Position = UDim2.new(0.1, 0, 0.2, 0)
  409. TextBox.Size = UDim2.new(0.8, 0, 0.2, 0)
  410. TextBox.Font = Enum.Font.SourceSans
  411. TextBox.PlaceholderText = "Enter username"
  412. TextBox.Text = ""
  413. TextBox.TextColor3 = Color3.fromRGB(0, 0, 0)
  414. TextBox.TextSize = 14
  415.  
  416. TextButton.Parent = Frame
  417. TextButton.BackgroundColor3 = Color3.fromRGB(255, 0, 0)
  418. TextButton.Position = UDim2.new(0.1, 0, 0.5, 0)
  419. TextButton.Size = UDim2.new(0.8, 0, 0.4, 0)
  420. TextButton.Font = Enum.Font.SourceSans
  421. TextButton.Text = "FLING!"
  422. TextButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  423. TextButton.TextSize = 20
  424.  
  425. -- Close button properties
  426. CloseButton.Parent = Frame
  427. CloseButton.BackgroundColor3 = Color3.fromRGB(255, 0, 0)
  428. CloseButton.Position = UDim2.new(0.9, 0, 0, 0)
  429. CloseButton.Size = UDim2.new(0, 20, 0, 20)
  430. CloseButton.Font = Enum.Font.SourceSans
  431. CloseButton.Text = "X"
  432. CloseButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  433. CloseButton.TextSize = 14
  434.  
  435. local function GetPlayer(Name)
  436.     Name = Name:lower()
  437.     for _, x in next, Players:GetPlayers() do
  438.         if x ~= Player then
  439.             if x.Name:lower():match("^" .. Name) or x.DisplayName:lower():match("^" .. Name) then
  440.                 return x
  441.             end
  442.         end
  443.     end
  444.     return nil
  445. end
  446.  
  447. local function Message(_Title, _Text, Time)
  448.     game:GetService("StarterGui"):SetCore("SendNotification", {Title = _Title, Text = _Text, Duration = Time})
  449. end
  450.  
  451. local function SkidFling(TargetPlayer)
  452.     local Character = Player.Character
  453.     local Humanoid = Character and Character:FindFirstChildOfClass("Humanoid")
  454.     local RootPart = Humanoid and Humanoid.RootPart
  455.  
  456.     local TCharacter = TargetPlayer.Character
  457.     local THumanoid = TCharacter and TCharacter:FindFirstChildOfClass("Humanoid")
  458.     local TRootPart = THumanoid and THumanoid.RootPart
  459.     local THead = TCharacter and TCharacter:FindFirstChild("Head")
  460.     local Accessory = TCharacter and TCharacter:FindFirstChildOfClass("Accessory")
  461.     local Handle = Accessory and Accessory:FindFirstChild("Handle")
  462.  
  463.     if Character and Humanoid and RootPart then
  464.         if RootPart.Velocity.Magnitude < 50 then
  465.             getgenv().OldPos = RootPart.CFrame
  466.         end
  467.         if THumanoid and THumanoid.Sit then
  468.             return Message("Error Occurred", "Target is sitting", 5)
  469.         end
  470.         if THead then
  471.             workspace.CurrentCamera.CameraSubject = THead
  472.         elseif Handle then
  473.             workspace.CurrentCamera.CameraSubject = Handle
  474.         else
  475.             workspace.CurrentCamera.CameraSubject = THumanoid
  476.         end
  477.         if not TCharacter:FindFirstChildWhichIsA("BasePart") then
  478.             return
  479.         end
  480.  
  481.         local function FPos(BasePart, Pos, Ang)
  482.             RootPart.CFrame = CFrame.new(BasePart.Position) * Pos * Ang
  483.             Character:SetPrimaryPartCFrame(CFrame.new(BasePart.Position) * Pos * Ang)
  484.             RootPart.Velocity = Vector3.new(9e7, 9e7 * 10, 9e7)
  485.             RootPart.RotVelocity = Vector3.new(9e8, 9e8, 9e8)
  486.         end
  487.  
  488.         local function SFBasePart(BasePart)
  489.             local TimeToWait = 2
  490.             local Time = tick()
  491.             local Angle = 0
  492.  
  493.             repeat
  494.                 if RootPart and THumanoid then
  495.                     if BasePart.Velocity.Magnitude < 50 then
  496.                         Angle = Angle + 100
  497.  
  498.                         FPos(BasePart, CFrame.new(0, 1.5, 0) + THumanoid.MoveDirection * BasePart.Velocity.Magnitude / 1.25, CFrame.Angles(math.rad(Angle),0 ,0))
  499.                         task.wait()
  500.  
  501.                         FPos(BasePart, CFrame.new(0, -1.5, 0) + THumanoid.MoveDirection * BasePart.Velocity.Magnitude / 1.25, CFrame.Angles(math.rad(Angle), 0, 0))
  502.                         task.wait()
  503.  
  504.                         FPos(BasePart, CFrame.new(2.25, 1.5, -2.25) + THumanoid.MoveDirection * BasePart.Velocity.Magnitude / 1.25, CFrame.Angles(math.rad(Angle), 0, 0))
  505.                         task.wait()
  506.  
  507.                         FPos(BasePart, CFrame.new(-2.25, -1.5, 2.25) + THumanoid.MoveDirection * BasePart.Velocity.Magnitude / 1.25, CFrame.Angles(math.rad(Angle), 0, 0))
  508.                         task.wait()
  509.  
  510.                         FPos(BasePart, CFrame.new(0, 1.5, 0) + THumanoid.MoveDirection,CFrame.Angles(math.rad(Angle), 0, 0))
  511.                         task.wait()
  512.  
  513.                         FPos(BasePart, CFrame.new(0, -1.5, 0) + THumanoid.MoveDirection,CFrame.Angles(math.rad(Angle), 0, 0))
  514.                         task.wait()
  515.                     else
  516.                         FPos(BasePart, CFrame.new(0, 1.5, THumanoid.WalkSpeed), CFrame.Angles(math.rad(90), 0, 0))
  517.                         task.wait()
  518.  
  519.                         FPos(BasePart, CFrame.new(0, -1.5, -THumanoid.WalkSpeed), CFrame.Angles(0, 0, 0))
  520.                         task.wait()
  521.  
  522.                         FPos(BasePart, CFrame.new(0, 1.5, THumanoid.WalkSpeed), CFrame.Angles(math.rad(90), 0, 0))
  523.                         task.wait()
  524.  
  525.                         FPos(BasePart, CFrame.new(0, 1.5, TRootPart.Velocity.Magnitude / 1.25), CFrame.Angles(math.rad(90), 0, 0))
  526.                         task.wait()
  527.  
  528.                         FPos(BasePart, CFrame.new(0, -1.5, -TRootPart.Velocity.Magnitude / 1.25), CFrame.Angles(0, 0, 0))
  529.                         task.wait()
  530.  
  531.                         FPos(BasePart, CFrame.new(0, 1.5, TRootPart.Velocity.Magnitude / 1.25), CFrame.Angles(math.rad(90), 0, 0))
  532.                         task.wait()
  533.  
  534.                         FPos(BasePart, CFrame.new(0, -1.5, 0), CFrame.Angles(math.rad(90), 0, 0))
  535.                         task.wait()
  536.  
  537.                         FPos(BasePart, CFrame.new(0, -1.5, 0), CFrame.Angles(0, 0, 0))
  538.                         task.wait()
  539.  
  540.                         FPos(BasePart, CFrame.new(0, -1.5 ,0), CFrame.Angles(math.rad(-90), 0, 0))
  541.                         task.wait()
  542.  
  543.                         FPos(BasePart, CFrame.new(0, -1.5, 0), CFrame.Angles(0, 0, 0))
  544.                         task.wait()
  545.                     end
  546.                 else
  547.                     break
  548.                 end
  549.             until BasePart.Velocity.Magnitude > 500 or BasePart.Parent ~= TargetPlayer.Character or TargetPlayer.Parent ~= Players or not TargetPlayer.Character == TCharacter or THumanoid.Sit or Humanoid.Health <= 0 or tick() > Time + TimeToWait
  550.         end
  551.  
  552.         workspace.FallenPartsDestroyHeight = 0/0
  553.  
  554.         local BV = Instance.new("BodyVelocity")
  555.         BV.Name = "EpixVel"
  556.         BV.Parent = RootPart
  557.         BV.Velocity = Vector3.new(9e8, 9e8, 9e8)
  558.         BV.MaxForce = Vector3.new(1/0, 1/0, 1/0)
  559.  
  560.         Humanoid:SetStateEnabled(Enum.HumanoidStateType.Seated, false)
  561.  
  562.         if TRootPart and THead then
  563.             if (TRootPart.CFrame.p - THead.CFrame.p).Magnitude > 5 then
  564.                 SFBasePart(THead)
  565.             else
  566.                 SFBasePart(TRootPart)
  567.             end
  568.         elseif TRootPart and not THead then
  569.             SFBasePart(TRootPart)
  570.         elseif not TRootPart and THead then
  571.             SFBasePart(THead)
  572.         elseif not TRootPart and not THead and Accessory and Handle then
  573.             SFBasePart(Handle)
  574.         end
  575.  
  576.         BV:Destroy()
  577.         Humanoid:SetStateEnabled(Enum.HumanoidStateType.Seated, true)
  578.         workspace.CurrentCamera.CameraSubject = Humanoid
  579.  
  580.         repeat
  581.             RootPart.CFrame = getgenv().OldPos * CFrame.new(0, .5, 0)
  582.             Character:SetPrimaryPartCFrame(getgenv().OldPos * CFrame.new(0, .5, 0))
  583.             Humanoid:ChangeState("GettingUp")
  584.             table.foreach(Character:GetChildren(), function(_, x)
  585.                 if x:IsA("BasePart") then
  586.                     x.Velocity, x.RotVelocity = Vector3.new(), Vector3.new()
  587.                 end
  588.             end)
  589.             task.wait()
  590.         until (RootPart.Position - getgenv().OldPos.p).Magnitude < 25
  591.         workspace.FallenPartsDestroyHeight = getgenv().FPDH
  592.     else
  593.         return Message("Error Occurred", "Random error", 5)
  594.     end
  595. end
  596.  
  597. TextButton.MouseButton1Click:Connect(function()
  598.     local targetName = TextBox.Text
  599.     local targetPlayer = GetPlayer(targetName)
  600.  
  601.     if targetPlayer then
  602.         SkidFling(targetPlayer)
  603.     else
  604.         Message("Error Occurred", "Invalid username", 5)
  605.     end
  606. end)
  607.  
  608. -- Close button functionality
  609. CloseButton.MouseButton1Click:Connect(function()
  610.     ScreenGui.Enabled = false
  611. end)
  612.    end,
  613. })
  614.  
  615. local Toggle = STUFFTab:CreateButton({
  616.     Name = "✖️Bunny Sprint✖️",
  617.     Callback = function(Value)
  618.         -- Movement settings
  619. local STRAFE_SPEED = 30
  620. local AIR_MULTIPLIER = 1.5
  621. local BHOP_POWER = 40
  622.  
  623. -- Services
  624. local Players = game:GetService("Players")
  625. local UserInputService = game:GetService("UserInputService")
  626. local RunService = game:GetService("RunService")
  627.  
  628. -- Local player setup
  629. local player = Players.LocalPlayer
  630. local mouse = player:GetMouse()
  631.  
  632. -- Variables
  633. local moveKeys = {
  634.     W = false,
  635.     A = false,
  636.     S = false,
  637.     D = false,
  638.     Space = false
  639. }
  640.  
  641. -- Functions to handle character access safely
  642. local function getChar()
  643.     return player.Character or player.CharacterAdded:Wait()
  644. end
  645.  
  646. local function getRoot()
  647.     local char = getChar()
  648.     return char:FindFirstChild("HumanoidRootPart")
  649. end
  650.  
  651. local function getHumanoid()
  652.     local char = getChar()
  653.     return char:FindFirstChild("Humanoid")
  654. end
  655.  
  656. -- Movement function
  657. local function calculateMoveDirection()
  658.     local dir = Vector3.new(0, 0, 0)
  659.     local char = getChar()
  660.     if not char then return dir end
  661.    
  662.     local cf = workspace.CurrentCamera.CFrame
  663.    
  664.     if moveKeys.W then
  665.         dir = dir + cf.LookVector
  666.     end
  667.     if moveKeys.S then
  668.         dir = dir - cf.LookVector
  669.     end
  670.     if moveKeys.A then
  671.         dir = dir - cf.RightVector
  672.     end
  673.     if moveKeys.D then
  674.         dir = dir + cf.RightVector
  675.     end
  676.    
  677.     dir = Vector3.new(dir.X, 0, dir.Z).Unit
  678.     return dir
  679. end
  680.  
  681. -- Key handling
  682. UserInputService.InputBegan:Connect(function(input, gameProcessed)
  683.     if gameProcessed then return end
  684.    
  685.     if input.KeyCode == Enum.KeyCode.W then
  686.         moveKeys.W = true
  687.     elseif input.KeyCode == Enum.KeyCode.A then
  688.         moveKeys.A = true
  689.     elseif input.KeyCode == Enum.KeyCode.S then
  690.         moveKeys.S = true
  691.     elseif input.KeyCode == Enum.KeyCode.D then
  692.         moveKeys.D = true
  693.     elseif input.KeyCode == Enum.KeyCode.Space then
  694.         moveKeys.Space = true
  695.     end
  696. end)
  697.  
  698. UserInputService.InputEnded:Connect(function(input, gameProcessed)
  699.     if input.KeyCode == Enum.KeyCode.W then
  700.         moveKeys.W = false
  701.     elseif input.KeyCode == Enum.KeyCode.A then
  702.         moveKeys.A = false
  703.     elseif input.KeyCode == Enum.KeyCode.S then
  704.         moveKeys.S = false
  705.     elseif input.KeyCode == Enum.KeyCode.D then
  706.         moveKeys.D = false
  707.     elseif input.KeyCode == Enum.KeyCode.Space then
  708.         moveKeys.Space = false
  709.     end
  710. end)
  711.  
  712. -- Main movement loop
  713. RunService.Heartbeat:Connect(function()
  714.     local char = getChar()
  715.     local root = getRoot()
  716.     local humanoid = getHumanoid()
  717.    
  718.     if not char or not root or not humanoid then return end
  719.    
  720.     -- Calculate movement
  721.     local moveDir = calculateMoveDirection()
  722.     local isInAir = humanoid:GetState() == Enum.HumanoidStateType.Jumping or
  723.                     humanoid:GetState() == Enum.HumanoidStateType.Freefall
  724.    
  725.     -- Apply movement
  726.     if moveDir.Magnitude > 0 then
  727.         local speed = STRAFE_SPEED
  728.         if isInAir then
  729.             speed = speed * AIR_MULTIPLIER
  730.         end
  731.        
  732.         -- Set velocity
  733.         local newVel = moveDir * speed
  734.         root.Velocity = Vector3.new(
  735.             newVel.X,
  736.             root.Velocity.Y,  -- Preserve vertical velocity
  737.             newVel.Z
  738.         )
  739.        
  740.         -- Bunny hop
  741.         if moveKeys.Space and root.Velocity.Y < 1 then
  742.             root.Velocity = Vector3.new(
  743.                 root.Velocity.X,
  744.                 BHOP_POWER,
  745.                 root.Velocity.Z
  746.             )
  747.         end
  748.     end
  749. end)
  750.  
  751. -- Notification
  752. game:GetService("StarterGui"):SetCore("SendNotification", {
  753.     Title = "Movement Script Loaded",
  754.     Text = "Controls: WASD to move, Space to jump",
  755.     Duration = 5
  756. })
  757.     end,
  758. })
  759.  
  760.  
  761. local UserInputService = game:GetService("UserInputService")
  762. local Players = game:GetService("Players")
  763. local RunService = game:GetService("RunService")
  764. local Camera = workspace.CurrentCamera
  765. local LocalPlayer = Players.LocalPlayer
  766.  
  767. local LockedPlayer = nil
  768. local LastKnownPosition = nil
  769. local FieldOfView = 40 -- Set the field of view to 40 degrees
  770. local CenterPrioritizationFactor = 0.5 -- Decrease this value to shrink the priority "circle"
  771. local AimbotEnabled = false -- Track whether the aimbot is enabled or not
  772.  
  773. -- Function to check if a player is on the enemy team
  774. local function isEnemyTeam(player)
  775.     -- If the local player has no team, or the target player has no team, return false
  776.     if not LocalPlayer.Team or not player.Team then
  777.         return false
  778.     end
  779.    
  780.     -- Return true if the teams are different
  781.     return LocalPlayer.Team ~= player.Team
  782. end
  783.  
  784. -- Function to get the body part based on weighted probabilities
  785. local function getTargetBodyPart()
  786.     local randomValue = math.random()
  787.     if randomValue <= 0.7 then
  788.         return "UpperTorso" -- 70% chance
  789.     else
  790.         return "Head" -- 30% chance
  791.     end
  792. end
  793.  
  794. -- Function to get the closest enemy player to the crosshair, prioritizing players near the center of the screen and closest to the player
  795. local function getClosestEnemyPlayerToCrosshair()
  796.     local mousePosition = UserInputService:GetMouseLocation()
  797.     local closestPlayer = nil
  798.     local closestDistance = math.huge
  799.     local cameraPosition = Camera.CFrame.Position
  800.     local cameraForward = Camera.CFrame.LookVector
  801.     local centerOfScreen = Vector2.new(Camera.ViewportSize.X / 2, Camera.ViewportSize.Y / 2)
  802.  
  803.     for _, player in pairs(Players:GetPlayers()) do
  804.         -- Only target players who are on the enemy team
  805.         if player ~= LocalPlayer and player.Character and isEnemyTeam(player) then
  806.             -- Choose body part based on weighted probability
  807.             local targetBodyPartName = getTargetBodyPart()
  808.             local bodyPart = player.Character:FindFirstChild(targetBodyPartName)
  809.            
  810.             if bodyPart then
  811.                 local screenPosition, onScreen = Camera:WorldToViewportPoint(bodyPart.Position)
  812.  
  813.                 if onScreen then
  814.                     local playerPosition = bodyPart.Position - cameraPosition
  815.                     local angle = math.acos(cameraForward:Dot(playerPosition.Unit)) * (180 / math.pi)
  816.  
  817.                     -- Check if the player is within the FOV
  818.                     if angle <= FieldOfView / 2 then
  819.                         -- Calculate screen distance (distance between mouse and player)
  820.                         local screenDist = (Vector2.new(screenPosition.X, screenPosition.Y) - mousePosition).Magnitude
  821.                         -- Calculate distance from the center of the screen, but apply the CenterPrioritizationFactor to shrink the circle
  822.                         local distanceFromCenter = (Vector2.new(screenPosition.X, screenPosition.Y) - centerOfScreen).Magnitude * CenterPrioritizationFactor
  823.                         -- Calculate the distance from the local player to the target player
  824.                         local distanceToPlayer = (LocalPlayer.Character.Head.Position - bodyPart.Position).Magnitude
  825.  
  826.                         -- Combine these factors:
  827.                         -- Prioritize players close to the center and those closer to the local player
  828.                         local weightedScore = screenDist + distanceFromCenter + distanceToPlayer
  829.  
  830.                         -- Find the closest player based on the combined score
  831.                         if weightedScore < closestDistance then
  832.                             closestDistance = weightedScore
  833.                             closestPlayer = {player = player, bodyPart = targetBodyPartName}
  834.                         end
  835.                     end
  836.                 end
  837.             end
  838.         end
  839.     end
  840.  
  841.     return closestPlayer
  842. end
  843.  
  844. -- Function to lock the camera onto the target player's body part
  845. local function lockCameraOnPlayer(targetData)
  846.     if targetData and targetData.player.Character then
  847.         local bodyPart = targetData.player.Character:FindFirstChild(targetData.bodyPart)
  848.        
  849.         if bodyPart then
  850.             LockedPlayer = targetData.player
  851.             LastKnownPosition = bodyPart.Position
  852.  
  853.             RunService:BindToRenderStep("LockCamera", Enum.RenderPriority.Camera.Value, function()
  854.                 if LockedPlayer and LockedPlayer.Character and isEnemyTeam(LockedPlayer) then
  855.                     local currentBodyPart = LockedPlayer.Character:FindFirstChild(targetData.bodyPart)
  856.                    
  857.                     if currentBodyPart then
  858.                         local targetPosition = currentBodyPart.Position
  859.  
  860.                         -- Check if the player has moved more than 5 meters
  861.                         if (targetPosition - LastKnownPosition).Magnitude > 5 then
  862.                             -- Stop tracking if the player has teleported more than 5 meters
  863.                             RunService:UnbindFromRenderStep("LockCamera")
  864.                             LockedPlayer = nil
  865.                             LastKnownPosition = nil
  866.                             return
  867.                         end
  868.  
  869.                         -- Update the last known position
  870.                         LastKnownPosition = targetPosition
  871.  
  872.                         -- Lock the camera onto the player's body part
  873.                         Camera.CFrame = CFrame.new(Camera.CFrame.Position, targetPosition)
  874.                     else
  875.                         RunService:UnbindFromRenderStep("LockCamera")
  876.                         LockedPlayer = nil
  877.                         LastKnownPosition = nil
  878.                     end
  879.                 else
  880.                     RunService:UnbindFromRenderStep("LockCamera")
  881.                     LockedPlayer = nil
  882.                     LastKnownPosition = nil
  883.                 end
  884.             end)
  885.         end
  886.     end
  887. end
  888.  
  889. -- Rayfield UI Toggle for Aimbot
  890. local Toggle = AIMTab:CreateToggle({
  891.     Name = "🔫Aimbot🔫 (RCLICK)",
  892.     CurrentValue = false,
  893.     Flag = "AIM1", -- A flag is the identifier for the configuration file
  894.     Callback = function(Value)
  895.         -- The function that takes place when the toggle is pressed
  896.         AimbotEnabled = Value
  897.         if not AimbotEnabled then
  898.             -- Stop tracking if the aimbot is disabled
  899.             RunService:UnbindFromRenderStep("LockCamera")
  900.             LockedPlayer = nil
  901.             LastKnownPosition = nil
  902.         end
  903.     end,
  904. })
  905.  
  906. -- Detect right-click and lock onto the closest enemy player within FOV, only if Aimbot is enabled
  907. UserInputService.InputBegan:Connect(function(input, gameProcessed)
  908.     if not gameProcessed and input.UserInputType == Enum.UserInputType.MouseButton2 and AimbotEnabled then
  909.         local closestPlayer = getClosestEnemyPlayerToCrosshair()
  910.         lockCameraOnPlayer(closestPlayer)
  911.     end
  912. end)
  913.  
  914. -- Stop locking the camera when right-click is released
  915. UserInputService.InputEnded:Connect(function(input, gameProcessed)
  916.     if input.UserInputType == Enum.UserInputType.MouseButton2 then
  917.         RunService:UnbindFromRenderStep("LockCamera")
  918.         LockedPlayer = nil
  919.         LastKnownPosition = nil
  920.     end
  921. end)
  922.  
  923. -- This next part is for silent aim, you can modify the vectors to change how good the silent aim is
  924. -- Function to get the Players service name dynamically
  925. local function getPlayersName()
  926.     for i, v in pairs(game:GetChildren()) do
  927.         if v.ClassName == "Players" then
  928.             return v.Name
  929.         end
  930.     end
  931. end
  932.  
  933. local playersService = getPlayersName()
  934. local localPlayer = game[playersService].LocalPlayer
  935.  
  936. -- Global variables to control the script
  937. local isModificationEnabled = false
  938. local modificationCoroutine = nil
  939.  
  940. -- Function to modify player character parts
  941. local function modifyPlayerParts()
  942.     while isModificationEnabled do
  943.         for _, v in pairs(game[playersService]:GetPlayers()) do
  944.             if v.Name ~= localPlayer.Name and v.Character then
  945.                 local parts = {
  946.                     "RightUpperLeg",
  947.                     "LeftUpperLeg",
  948.                     "HeadHB",
  949.                     "HumanoidRootPart"
  950.                 }
  951.                
  952.                 for _, partName in ipairs(parts) do
  953.                     local part = v.Character:FindFirstChild(partName)
  954.                     if part then
  955.                         part.CanCollide = false
  956.                         part.Transparency = 10
  957.                         part.Size = Vector3.new(10, 10, 10)
  958.                     end
  959.                 end
  960.             end
  961.         end
  962.         wait(1)  -- Wait for 1 second before next iteration
  963.     end
  964.    
  965.     -- Reset parts when modification is disabled
  966.     for _, v in pairs(game[playersService]:GetPlayers()) do
  967.         if v.Name ~= localPlayer.Name and v.Character then
  968.             local parts = {
  969.                 "RightUpperLeg",
  970.                 "LeftUpperLeg",
  971.                 "HeadHB",
  972.                 "HumanoidRootPart"
  973.             }
  974.            
  975.             for _, partName in ipairs(parts) do
  976.                 local part = v.Character:FindFirstChild(partName)
  977.                 if part then
  978.                     part.CanCollide = true
  979.                     part.Transparency = 0
  980.                     part.Size = Vector3.new(1, 1, 1)
  981.                 end
  982.             end
  983.         end
  984.     end
  985. end
  986.  
  987. -- Create Toggle for Player Part Modification
  988. local Toggle = AIMTab:CreateToggle({
  989.     Name = "🔫silent aim🔫",
  990.     CurrentValue = false,
  991.     Flag = "PlayerPartModification",
  992.     Callback = function(Value)
  993.         isModificationEnabled = Value
  994.        
  995.         if Value then
  996.             -- Start the modification coroutine
  997.             modificationCoroutine = coroutine.create(modifyPlayerParts)
  998.             coroutine.resume(modificationCoroutine)
  999.         else
  1000.             -- If the coroutine is running, it will exit due to isModificationEnabled being false
  1001.             modificationCoroutine = nil
  1002.         end
  1003.     end,
  1004. })
  1005.  
  1006.  
  1007. local Toggle = AIMTab:CreateToggle({
  1008.     Name = "🔫TriggerBot🔫",
  1009.     CurrentValue = false,
  1010.     Flag = "EnemyAutoClickToggle",
  1011.     Callback = function(Value)
  1012.         if Value then
  1013.             -- Activate auto-click
  1014.             getgenv().AutoClickConnection = game:GetService("RunService").RenderStepped:Connect(function()
  1015.                 local Players = game:GetService("Players")
  1016.                 local LocalPlayer = Players.LocalPlayer
  1017.                 local Mouse = LocalPlayer:GetMouse()
  1018.  
  1019.                 if Mouse.Target and Mouse.Target.Parent then
  1020.                     local TargetPlayer = Players:GetPlayerFromCharacter(Mouse.Target.Parent)
  1021.                    
  1022.                     if TargetPlayer and TargetPlayer ~= LocalPlayer then
  1023.                         if not TargetPlayer.Team or TargetPlayer.Team ~= LocalPlayer.Team then
  1024.                             mouse1press()
  1025.                             wait()
  1026.                             mouse1release()
  1027.                         end
  1028.                     end
  1029.                 end
  1030.             end)
  1031.         else
  1032.             -- Deactivate auto-click
  1033.             if getgenv().AutoClickConnection then
  1034.                 getgenv().AutoClickConnection:Disconnect()
  1035.             end
  1036.         end
  1037.     end
  1038. })
  1039.  
  1040. -- Services
  1041. local Players = game:GetService("Players")
  1042. local RunService = game:GetService("RunService")
  1043. local LocalPlayer = Players.LocalPlayer
  1044. local Camera = workspace.CurrentCamera
  1045.  
  1046. -- Variables for ESP
  1047. local espEnabled = false -- Tracks the ESP state
  1048. local espConnection -- Stores the RenderStepped connection for ESP updates
  1049.  
  1050. -- Variables for Tracers
  1051. local drawLinesEnabled = false
  1052. local lines = {} -- Store all the lines
  1053. local tracerConnection -- Stores the RenderStepped connection for tracers
  1054.  
  1055. -- Function to create a hollow rectangle with thicker borders (ESP box)
  1056. local function createHollowBox()
  1057.     local box = Instance.new("BillboardGui")
  1058.     box.Size = UDim2.new(4, 0, 5, 0)
  1059.     box.AlwaysOnTop = true
  1060.     box.Adornee = nil
  1061.     box.Name = "PlayerBox"
  1062.  
  1063.     local borderThickness = 0.05 -- Increased from 0.03 to make borders thicker
  1064.  
  1065.     local top = Instance.new("Frame")
  1066.     top.Size = UDim2.new(1, 0, borderThickness, 0)
  1067.     top.Position = UDim2.new(0, 0, 0, 0)
  1068.     top.BackgroundColor3 = Color3.new(1, 0, 0)
  1069.     top.BorderSizePixel = 0
  1070.     top.Parent = box
  1071.  
  1072.     local bottom = Instance.new("Frame")
  1073.     bottom.Size = UDim2.new(1, 0, borderThickness, 0)
  1074.     bottom.Position = UDim2.new(0, 0, 1 - borderThickness, 0)
  1075.     bottom.BackgroundColor3 = Color3.new(1, 0, 0)
  1076.     bottom.BorderSizePixel = 0
  1077.     bottom.Parent = box
  1078.  
  1079.     local left = Instance.new("Frame")
  1080.     left.Size = UDim2.new(borderThickness, 0, 1, 0)
  1081.     left.Position = UDim2.new(0, 0, 0, 0)
  1082.     left.BackgroundColor3 = Color3.new(1, 0, 0)
  1083.     left.BorderSizePixel = 0
  1084.     left.Parent = box
  1085.  
  1086.     local right = Instance.new("Frame")
  1087.     right.Size = UDim2.new(borderThickness, 0, 1, 0)
  1088.     right.Position = UDim2.new(1 - borderThickness, 0, 0, 0)
  1089.     right.BackgroundColor3 = Color3.new(1, 0, 0)
  1090.     right.BorderSizePixel = 0
  1091.     right.Parent = box
  1092.  
  1093.     return box
  1094. end
  1095.  
  1096. -- Function to check if a player is on the enemy team
  1097. local function isEnemyTeam(player)
  1098.     return player.Team ~= LocalPlayer.Team
  1099. end
  1100.  
  1101. -- Function to highlight all enemy players (ESP)
  1102. local function highlightAllPlayers()
  1103.     for _, player in pairs(Players:GetPlayers()) do
  1104.         if player ~= LocalPlayer and isEnemyTeam(player) then
  1105.             if player.Character and player.Character:FindFirstChild("HumanoidRootPart") then
  1106.                 if not player.Character:FindFirstChild("PlayerBox") then
  1107.                     local box = createHollowBox()
  1108.                     box.Adornee = player.Character:FindFirstChild("HumanoidRootPart")
  1109.                     box.Parent = player.Character
  1110.                 end
  1111.             end
  1112.         else
  1113.             if player.Character and player.Character:FindFirstChild("PlayerBox") then
  1114.                 player.Character.PlayerBox:Destroy()
  1115.             end
  1116.         end
  1117.     end
  1118. end
  1119.  
  1120. -- Clean up highlights when players leave
  1121. local function onPlayerRemoving(player)
  1122.     if player.Character and player.Character:FindFirstChild("PlayerBox") then
  1123.         player.Character.PlayerBox:Destroy()
  1124.     end
  1125. end
  1126.  
  1127. -- Enable or disable ESP
  1128. local function toggleESP(state)
  1129.     if state then
  1130.         espConnection = RunService.RenderStepped:Connect(highlightAllPlayers)
  1131.         Players.PlayerRemoving:Connect(onPlayerRemoving)
  1132.     else
  1133.         if espConnection then
  1134.             espConnection:Disconnect()
  1135.             espConnection = nil
  1136.         end
  1137.         for _, player in pairs(Players:GetPlayers()) do
  1138.             if player.Character and player.Character:FindFirstChild("PlayerBox") then
  1139.                 player.Character.PlayerBox:Destroy()
  1140.             end
  1141.         end
  1142.     end
  1143. end
  1144.  
  1145. -- Function to create and update tracers (lines)
  1146. local function createLine()
  1147.     local line = Drawing.new("Line")
  1148.     line.Visible = true
  1149.     line.Thickness = 3 -- Increased from 1 to make lines thicker
  1150.     line.Color = Color3.new(1, 0, 0)
  1151.     return line
  1152. end
  1153.  
  1154. local function updateLines()
  1155.     -- Hide all lines first
  1156.     for _, line in ipairs(lines) do
  1157.         line.Visible = false
  1158.     end
  1159.  
  1160.     local screenCenter = Vector2.new(Camera.ViewportSize.X / 2, Camera.ViewportSize.Y / 2)
  1161.     local index = 1
  1162.     for _, player in ipairs(Players:GetPlayers()) do
  1163.         -- Only draw lines to enemy team players
  1164.         if player ~= LocalPlayer and isEnemyTeam(player) and player.Character and player.Character:FindFirstChild("HumanoidRootPart") then
  1165.             local character = player.Character
  1166.             local rootPart = character.HumanoidRootPart
  1167.             local worldPosition = rootPart.Position
  1168.             local screenPosition, onScreen = Camera:WorldToViewportPoint(worldPosition)
  1169.  
  1170.             if onScreen then
  1171.                 local line = lines[index] or createLine()
  1172.                 line.From = screenCenter
  1173.                 line.To = Vector2.new(screenPosition.X, screenPosition.Y)
  1174.                 line.Visible = true
  1175.  
  1176.                 lines[index] = line
  1177.                 index = index + 1
  1178.             end
  1179.         end
  1180.     end
  1181.  
  1182.     -- Hide remaining lines if there are no players to connect to
  1183.     for i = index, #lines do
  1184.         lines[i].Visible = false
  1185.     end
  1186. end
  1187.  
  1188. local function cleanupLines()
  1189.     -- Clean up the lines by making them invisible and removing them
  1190.     for _, line in ipairs(lines) do
  1191.         line.Visible = false
  1192.         line:Remove()
  1193.     end
  1194.     lines = {}
  1195. end
  1196.  
  1197. -- Toggle for tracers (line drawing)
  1198. local function toggleLineDrawing(state)
  1199.     if state then
  1200.         tracerConnection = RunService.RenderStepped:Connect(updateLines)
  1201.     else
  1202.         if tracerConnection then
  1203.             tracerConnection:Disconnect()
  1204.             tracerConnection = nil
  1205.         end
  1206.         cleanupLines()
  1207.     end
  1208. end
  1209.  
  1210. -- Rayfield UI Toggles
  1211.  
  1212. -- ESP Toggle
  1213. ESPTab:CreateToggle({
  1214.     Name = "🔴Enemy Boxes🔴",
  1215.     CurrentValue = false,
  1216.     Flag = "BOX1",
  1217.     Callback = function(Value)
  1218.         espEnabled = Value
  1219.         toggleESP(Value)
  1220.     end,
  1221. })
  1222.  
  1223. -- Tracers Toggle
  1224. ESPTab:CreateToggle({
  1225.     Name = "🔴Tracer (Enemys)🔴",
  1226.     CurrentValue = false,
  1227.     Flag = "Tracer1",
  1228.     Callback = function(Value)
  1229.         drawLinesEnabled = Value
  1230.         toggleLineDrawing(Value)
  1231.     end,
  1232. })
  1233.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement