From a25f5a6ee7cb1989571a8651b0e1cde402d614b6 Mon Sep 17 00:00:00 2001 From: LostTrackpad Date: Tue, 18 Jun 2024 16:04:13 +0700 Subject: [PATCH] Fix cruel wallrun --- beatrun/gamemodes/beatrun/gamemode/sh/Wallrun.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/beatrun/gamemodes/beatrun/gamemode/sh/Wallrun.lua b/beatrun/gamemodes/beatrun/gamemode/sh/Wallrun.lua index 4d92624..567db71 100644 --- a/beatrun/gamemodes/beatrun/gamemode/sh/Wallrun.lua +++ b/beatrun/gamemodes/beatrun/gamemode/sh/Wallrun.lua @@ -78,6 +78,10 @@ local function WallrunningThink(ply, mv, cmd) mv:SetButtons(mv:GetButtons() - IN_DUCK) end + if math.Round(math.Rand(0, 1.1), 1) > 1 and SlippyWallrun:GetBool() and !ply:UsingRH() then + timer.Simple(math.Rand(0, (ply:GetWallrunTime() - CurTime())), function() ply:SetWallrunTime(0) end) + end + local wrtimeremains = CurTime() < ply:GetWallrunTime() if PuristWallrun:GetBool() then @@ -522,12 +526,12 @@ end local vecdir = Vector(1000, 1000, 1000) hook.Add("SetupMove", "Wallrunning", function(ply, mv, cmd) - if ply:GetWallrun() == nil or not ply:Alive() or (CrueltyParkour:GetBool() and !(ply:UsingRH())) then + if ply:GetWallrun() == nil or not ply:Alive() or (CrueltyParkour:GetBool() and !ply:UsingRH() and !SlippyWallrun:GetBool()) then ply:SetWallrun(0) end if ply:GetWallrun() == 0 and mv:GetVelocity().z > -450 and not ply:OnGround() and mv:KeyDown(IN_FORWARD) and not ply:Crouching() and not mv:KeyDown(IN_DUCK) and ply:GetMoveType() ~= MOVETYPE_NOCLIP and ply:WaterLevel() < 1 then - if (CrueltyParkour:GetBool() and (ply:GetActiveWeapon():GetClass() != "runnerhands")) then + if (CrueltyParkour:GetBool() and !ply:UsingRH() and !SlippyWallrun:GetBool()) then else WallrunningCheck(ply, mv, cmd) end