From 5729cb7dc4d562da0040e007be68a0436981ce1f Mon Sep 17 00:00:00 2001 From: relaxtakenotes <134127331+jeffthekillerz@users.noreply.github.com> Date: Fri, 2 Jun 2023 20:16:21 +0500 Subject: [PATCH] proper kick glitch --- .../gamemodes/beatrun/gamemode/sh/Melee.lua | 22 ++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/beatrun/gamemodes/beatrun/gamemode/sh/Melee.lua b/beatrun/gamemodes/beatrun/gamemode/sh/Melee.lua index f365e25..171ffd1 100644 --- a/beatrun/gamemodes/beatrun/gamemode/sh/Melee.lua +++ b/beatrun/gamemodes/beatrun/gamemode/sh/Melee.lua @@ -270,11 +270,23 @@ hook.Add("SetupMove", "Melee", function(ply, mv, cmd) end if ply:GetMeleeDelay() < CurTime() and ply:GetMelee() ~= 0 then - if kickglitch:GetBool() and ply:GetMelee() >= 5 and mv:KeyDown(IN_JUMP) and not ply:OnGround() then - local vel = mv:GetVelocity() - vel:Mul(1.25) - vel.z = 300 - mv:SetVelocity(vel) + if kickglitch:GetBool() and ply:GetMelee() >= 5 and not ply:OnGround() then + if SERVER then + local platform = ents.Create("prop_physics") + local pos = ply:GetPos() + + pos.z = pos.z - 8 + + platform:SetModel("models/hunter/plates/plate05x05.mdl") + platform:SetPos(pos) + platform:SetColor(Color(0,0,0,0)) + platform:SetRenderMode(RENDERMODE_TRANSCOLOR) + platform:Spawn() + local phys = platform:GetPhysicsObject() + phys:EnableMotion(false) + + timer.Simple(0.3, function() SafeRemoveEntity(platform) end) + end ParkourEvent("jumpslow", ply) end