-- LocalScript: WalkController with Vena UI Library -- Place inside StarterPlayerScripts or StarterGui local Library = loadstring(game:HttpGet("https://raw.githubusercontent.com/laagginq/ui-libraries/main/ven/src.lua"))() local Players = game:GetService("Players") local RunService = game:GetService("RunService") local UserInputService = game:GetService("UserInputService") local player = Players.LocalPlayer local character = player.Character or player.CharacterAdded:Wait() local humanoid = character:WaitForChild("Humanoid") local rootPart = character:WaitForChild("HumanoidRootPart") local spawnPart = workspace:FindFirstChild("SpawnPart") -- ================================================================ -- WALK LOGIC -- ================================================================ local isWalking = false local walkLoopActive = false local currentSpeed = 16 local function randomPointOnSpawn() if not spawnPart then return Vector3.new(0, 5, 0) end local pos = spawnPart.Position local hx = spawnPart.Size.X / 2 - 1.5 local hz = spawnPart.Size.Z / 2 - 1.5 local y = pos.Y + spawnPart.Size.Y / 2 + 0.1 local rx = pos.X + (math.random(-1000, 1000) / 1000) * hx local rz = pos.Z + (math.random(-1000, 1000) / 1000) * hz return Vector3.new(rx, y, rz) end local function walkLoop() if walkLoopActive then return end walkLoopActive = true task.spawn(function() while isWalking do local target = randomPointOnSpawn() humanoid:MoveTo(target) local done = false local conn = humanoid.MoveToFinished:Connect(function() done = true end) local t = 0 while not done and t < 6 and isWalking do task.wait(0.1) t += 0.1 end pcall(function() conn:Disconnect() end) end walkLoopActive = false end) end local function stopWalking() isWalking = false humanoid:MoveTo(rootPart.Position) end local function startWalking() if not spawnPart then warn("SpawnPart not found in workspace!") return end isWalking = true humanoid.WalkSpeed = currentSpeed walkLoop() end -- ================================================================ -- ATTRACT LOGIC -- ================================================================ local attractEnabled = false local attractRadius = 30 local attractConn = nil local function cleanForces() for _, p in ipairs(Players:GetPlayers()) do if p == player then continue end local ch = p.Character if ch then local hr = ch:FindFirstChild("HumanoidRootPart") if hr then local bv = hr:FindFirstChild("_AWB") if bv then bv:Destroy() end end end end end local function stopAttract() attractEnabled = false if attractConn then attractConn:Disconnect() attractConn = nil end cleanForces() end local function startAttract() attractEnabled = true local last = 0 attractConn = RunService.Heartbeat:Connect(function() if not attractEnabled or not rootPart or not rootPart.Parent then return end local now = tick() if now - last < 0.4 then return end last = now for _, p in ipairs(Players:GetPlayers()) do if p == player then continue end local ch = p.Character if not ch then continue end local hr = ch:FindFirstChild("HumanoidRootPart") if not hr then continue end local d = (hr.Position - rootPart.Position).Magnitude if d <= attractRadius and d > 1 then local bv = hr:FindFirstChild("_AWB") if not bv then bv = Instance.new("BodyVelocity") bv.Name = "_AWB" bv.MaxForce = Vector3.new(1e4, 0, 1e4) bv.Parent = hr end bv.Velocity = (rootPart.Position - hr.Position).Unit * 22 else local bv = hr:FindFirstChild("_AWB") if bv then bv:Destroy() end end end end) end -- ================================================================ -- CREATE UI WINDOW -- ================================================================ local window = Library:Window("VenHub") -- Main Tab local mainTab = window:Tab("Controls") -- Walk Section mainTab:Button("Start Walking", function() if isWalking then stopWalking() else startWalking() end end) -- CHANGED: Max speed set to 150 mainTab:Slider("Walk Speed", 1, 150, currentSpeed, function(v) currentSpeed = v if isWalking then humanoid.WalkSpeed = currentSpeed end end) -- Attract Section mainTab:Button("Toggle Attract", function() if attractEnabled then stopAttract() else startAttract() end end) mainTab:Slider("Attract Radius", 5, 200, attractRadius, function(v) attractRadius = v end) -- Status Tab local statusTab = window:Tab("Status") local walkStatusLabel = statusTab:Label("Walking: OFF") local attractStatusLabel = statusTab:Label("Attract: OFF") local speedStatusLabel = statusTab:Label("Speed: " .. currentSpeed) local radiusStatusLabel = statusTab:Label("Radius: " .. attractRadius) -- Update status labels local function updateStatus() walkStatusLabel:Set("Walking: " .. (isWalking and "ON" or "OFF")) attractStatusLabel:Set("Attract: " .. (attractEnabled and "ON" or "OFF")) speedStatusLabel:Set("Speed: " .. currentSpeed) radiusStatusLabel:Set("Radius: " .. attractRadius) end -- Hook into existing functions to update UI local originalStopWalking = stopWalking local originalStartWalking = startWalking local originalStopAttract = stopAttract local originalStartAttract = startAttract stopWalking = function() originalStopWalking() updateStatus() end startWalking = function() originalStartWalking() updateStatus() end stopAttract = function() originalStopAttract() updateStatus() end startAttract = function() originalStartAttract() updateStatus() end -- Info Tab local infoTab = window:Tab("Info") infoTab:Label("Walk Controller") infoTab:Label("Made with Vena UI Library") infoTab:Label("") infoTab:Label("Controls:") infoTab:Label("• Start Walking - Randomly walks on SpawnPart") infoTab:Label("• Attract - Pulls other players towards you") infoTab:Label("") infoTab:Label("Press [Left Shift] to hide/show this window") -- ================================================================ -- HOTKEY (Left Shift) TO HIDE/SHOW UI -- ================================================================ UserInputService.InputBegan:Connect(function(input, gpe) if gpe then return end if input.KeyCode == Enum.KeyCode.LeftShift then window:Toggle() end end) -- ================================================================ -- RESPAWN HANDLER -- ================================================================ player.CharacterAdded:Connect(function(newChar) character = newChar humanoid = newChar:WaitForChild("Humanoid") rootPart = newChar:WaitForChild("HumanoidRootPart") if isWalking then stopWalking() end if attractEnabled then stopAttract() end updateStatus() end) -- Initial status update updateStatus()