--==================================================== -- RAKNET DELAY VISUALIZER -- MOBILE + PC SLIDER FIXED --==================================================== local Players = game:GetService("Players") local RunService = game:GetService("RunService") local UserInputService = game:GetService("UserInputService") local LocalPlayer = Players.LocalPlayer -- Create GUI Elements local ScreenGui = Instance.new("ScreenGui") ScreenGui.Name = "RakNetDelayVisualizer" ScreenGui.ResetOnSpawn = false ScreenGui.Parent = LocalPlayer:WaitForChild("PlayerGui") local MainFrame = Instance.new("Frame") MainFrame.Size = UDim2.new(0, 260, 0, 150) MainFrame.Position = UDim2.new(0.05, 0, 0.4, 0) MainFrame.BackgroundColor3 = Color3.fromRGB(25, 25, 25) MainFrame.BorderSizePixel = 0 MainFrame.Active = true MainFrame.Draggable = true MainFrame.Parent = ScreenGui local UICCorner = Instance.new("UICorner") UICCorner.CornerRadius = UDim.new(0, 8) UICCorner.Parent = MainFrame local Title = Instance.new("TextLabel") Title.Size = UDim2.new(1, 0, 0, 35) Title.BackgroundTransparency = 1 Title.Text = "RakNet Hitbox Delay" Title.TextColor3 = Color3.fromRGB(255, 255, 255) Title.TextSize = 14 Title.Font = Enum.Font.GothamBold Title.Parent = MainFrame local ValueLabel = Instance.new("TextLabel") ValueLabel.Size = UDim2.new(1, 0, 0, 25) ValueLabel.Position = UDim2.new(0, 0, 0, 35) ValueLabel.BackgroundTransparency = 1 ValueLabel.Text = "Delay: 0 ms" ValueLabel.TextColor3 = Color3.fromRGB(200, 200, 200) ValueLabel.TextSize = 12 ValueLabel.Font = Enum.Font.Gotham ValueLabel.Parent = MainFrame --==================================================== -- SLIDER UI --==================================================== local SliderBackground = Instance.new("Frame") SliderBackground.Size = UDim2.new(1, -40, 0, 8) SliderBackground.Position = UDim2.new(0, 20, 0, 88) SliderBackground.BackgroundColor3 = Color3.fromRGB(50, 50, 50) SliderBackground.BorderSizePixel = 0 SliderBackground.Active = true SliderBackground.Parent = MainFrame local SliderCorner = Instance.new("UICorner") SliderCorner.CornerRadius = UDim.new(1, 0) SliderCorner.Parent = SliderBackground local SliderFill = Instance.new("Frame") SliderFill.Size = UDim2.new(0, 0, 1, 0) SliderFill.BackgroundColor3 = Color3.fromRGB(0, 170, 255) SliderFill.BorderSizePixel = 0 SliderFill.Parent = SliderBackground local SliderFillCorner = Instance.new("UICorner") SliderFillCorner.CornerRadius = UDim.new(1, 0) SliderFillCorner.Parent = SliderFill local SliderButton = Instance.new("TextButton") SliderButton.Size = UDim2.new(0, 24, 0, 24) SliderButton.AnchorPoint = Vector2.new(0.5, 0.5) SliderButton.Position = UDim2.new(0, 0, 0.5, 0) SliderButton.BackgroundColor3 = Color3.fromRGB(255, 255, 255) SliderButton.Text = "" SliderButton.Active = true SliderButton.Parent = SliderBackground local ButtonCorner = Instance.new("UICorner") ButtonCorner.CornerRadius = UDim.new(1, 0) ButtonCorner.Parent = SliderButton --==================================================== -- VISUALIZER PART --==================================================== local GhostPart = Instance.new("Part") GhostPart.Size = Vector3.new(2, 5, 1) GhostPart.Anchored = true GhostPart.CanCollide = false GhostPart.Transparency = 0.6 GhostPart.Color = Color3.fromRGB(255, 50, 50) GhostPart.Material = Enum.Material.Neon GhostPart.Parent = workspace --==================================================== -- LOGIC VARIABLES --==================================================== local delayMs = 0 local maxDelay = 1000 local positionHistory = {} --==================================================== -- MOBILE + PC SLIDER INPUT --==================================================== local activeInput = nil local function updateSlider(inputX) local sliderPos = SliderBackground.AbsolutePosition.X local sliderSize = SliderBackground.AbsoluteSize.X if sliderSize <= 0 then return end local clampPos = math.clamp( (inputX - sliderPos) / sliderSize, 0, 1 ) SliderButton.Position = UDim2.new(clampPos, 0, 0.5, 0) SliderFill.Size = UDim2.new(clampPos, 0, 1, 0) delayMs = math.floor(clampPos * maxDelay) ValueLabel.Text = "Delay: " .. delayMs .. " ms" end local function beginSlider(input) if input.UserInputType == Enum.UserInputType.Touch or input.UserInputType == Enum.UserInputType.MouseButton1 then activeInput = input updateSlider(input.Position.X) end end SliderBackground.InputBegan:Connect(beginSlider) SliderButton.InputBegan:Connect(beginSlider) UserInputService.InputChanged:Connect(function(input) if not activeInput then return end if activeInput.UserInputType == Enum.UserInputType.Touch then if input == activeInput then updateSlider(input.Position.X) end elseif activeInput.UserInputType == Enum.UserInputType.MouseButton1 then if input.UserInputType == Enum.UserInputType.MouseMovement then updateSlider(input.Position.X) end end end) UserInputService.InputEnded:Connect(function(input) if input == activeInput or ( activeInput and activeInput.UserInputType == Enum.UserInputType.MouseButton1 and input.UserInputType == Enum.UserInputType.MouseButton1 ) then activeInput = nil end end) --==================================================== -- POSITION HISTORY + VISUALIZER --==================================================== RunService.RenderStepped:Connect(function() local character = LocalPlayer.Character if not character then return end local rootPart = character:FindFirstChild("HumanoidRootPart") if not rootPart then return end local currentTime = tick() table.insert(positionHistory, { Time = currentTime, CFrame = rootPart.CFrame }) local targetDelaySec = delayMs / 1000 while #positionHistory > 0 and (currentTime - positionHistory[1].Time) > targetDelaySec do table.remove(positionHistory, 1) end local delayedState = positionHistory[1] if delayedState then GhostPart.CFrame = delayedState.CFrame else GhostPart.CFrame = rootPart.CFrame end end) --==================================================== -- OPTIONAL RAKNET HOOK --==================================================== pcall(function() if rnet and rnet.SetFilter then rnet.Capture:Connect(function(packet) if delayMs > 0 then task.delay(delayMs / 1000, function() -- No packet reinjection implemented end) end end) end end) --==================================================== -- CLEANUP --==================================================== ScreenGui.AncestryChanged:Connect(function() if not ScreenGui.Parent then GhostPart:Destroy() end end)