
local toggler = 0
local ang
local view = {}

    local function Proplaunch()
    timer.Simple(0.00, function()
    local a = LocalPlayer():EyeAngles() LocalPlayer():SetEyeAngles(Angle(a.p-a.p-a.p, a.y-180, a.r))
    end)
    timer.Simple(0.07, function()
    RunConsoleCommand("+jump")
    timer.Simple(0.2, function() RunConsoleCommand("-jump") end)
    end)
    end
    concommand.Add("proplaunch", Proplaunch)
	
    local function mouseMovement(umc)
            local ang = Angle((eyeAng.p - umc:GetMouseY() / sensitivity) % 360, (eyeAng.y - umc:GetMouseX() / sensitivity) % 360, eyeAng.r)
     
            if ang.p > 270 or ang.p < 90 then
                    --eyeAng.p = 180 - ang.p
                    umc:SetViewAngles(eyeAng)
                    return
            end
     
            local weapon = LocalPlayer():GetActiveWeapon()
     
            -- Account for holding props with the physgun
            if not IsValid(weapon) or weapon:GetClass() ~= "weapon_physgun" or not LocalPlayer():KeyDown(IN_USE) then
                    eyeAng = ang
            end
     
            umc:SetViewAngles(eyeAng)
    end
	
    local function fixMovementKeys(ply, bind, pressed)
            if bind == "+moveright" and pressed then
                    RunConsoleCommand("+moveleft")
                    return true
            elseif bind == "+moveright" and not pressed then
                    RunConsoleCommand("-moveleft")
                    return true
            elseif bind == "+moveleft" and pressed then
                    RunConsoleCommand("+moveright")
                    return true
            elseif bind == "+moveleft" and not pressed then
                    RunConsoleCommand("-moveright")
                    return true
            end
    end
	
		CreateClientConVar("stopfalldmg_prop",  "models/props_trainstation/trainstation_post001.mdl")
	
    function PropDefense()
			LocalPlayer():SetEyeAngles(Angle(90, 0, 0))
			LocalPlayer():ConCommand("+attack")
		timer.Simple(0.1, function()
			RunConsoleCommand("gm_spawn", GetConVarString("stopfalldmg_prop"))
			LocalPlayer():ConCommand("+attack2")
		end)
		timer.Simple(0.2, function()
			LocalPlayer():ConCommand("-attack")
			LocalPlayer():SetEyeAngles(Angle(90, 0, 0))
			LocalPlayer():ConCommand("-attack2")
			LocalPlayer():ConCommand("undo")
			
		end)
    end
    concommand.Add("stopfalldmg", PropDefense)
	
    function Sleep()
            RunConsoleCommand("say", "/sleep")
     
            timer.Simple(7.0, function()
                    RunConsoleCommand("say", "/wakeup")
            end)
    end
     
    concommand.Add("FallAsleep", Sleep)
	
MsgC(Color(0,255,0), "180° Korki Loaded")



