EnableRCS = true --- When Set to false, it'll turn off Recoil Control!
RecoilControlMode = "Custom" --- Presets: "Low", "Medium", "High", "Ultra", "Insanity", "Custom"
RcCustomStrength = 3 -- Value MUST be ROUNDED! No Decimal values such as 6.5! Adjusted for Rust AK.
RequireToggle = false -- Change to false if you want it to always be on.
ToggleKey = "CapsLock" -- Usable Keys: "CapsLock", "NumLock", "ScrollLock"
DelayRate = 85 -- Adjusted for Rust AK fire rate (approx 85ms between shots). DO NOT CHANGE IF YOU DON'T KNOW WHAT YOU'RE DOING.
--[[
HOW TO USE FOR RUST AK RECOIL,
(RC)
1: If the "EnableRCS" is set to false, change to true.
2: Adjust your Recoil Control Strength, either by using a preset or a custom value! For Rust AK, 2-4 works well for minimal recoil.
3: Toggle it on (if you have RequireToggle enabled, else just do step 4.)
4: Hold Mouse1 and Mouse2 (LeftClick and RightClick for ADS and fire) and it should move your cursor to compensate recoil downwards and left.
5: Aim at your target and your recoil should be greatly reduced or none!
(Things to note)
1: I did NOT make the Recoil Control Code, I just simplified and adjusted for Rust AK.
2: You don't need to hold down your toggle key, its a toggle.
3: You must hold mouse1 and mouse2, or else IT WONT WORK!
4: DelayRate Works in MS, the lower the faster. 85ms is tuned for Rust AK.
--]]
------------- Recoil Presets for Rust AK ------
if RecoilControlMode == "Low" then
RecoilControlStrength = 1
elseif RecoilControlMode == "Medium" then
RecoilControlStrength = 2
elseif RecoilControlMode == "High" then
RecoilControlStrength = 3
elseif RecoilControlMode == "Ultra" then
RecoilControlStrength = 4
elseif RecoilControlMode == "Insanity" then
RecoilControlStrength = 7
elseif RecoilControlMode == "Custom" then
RecoilControlStrength = RcCustomStrength
end
--------------------------------------
EnablePrimaryMouseButtonEvents(true);
function OnEvent(event, arg)
if EnableRCS ~= false then
if RequireToggle ~= false then
if IsKeyLockOn(ToggleKey) then
if IsMouseButtonPressed(3) then
local shots_fired = 0
repeat
if IsMouseButtonPressed(1) then
repeat
shots_fired = shots_fired + 1
-- Slight increase for later shots to handle building recoil
local current_strength = RecoilControlStrength + math.floor((shots_fired - 1) / 20)
MoveMouseRelative(0, current_strength)
MoveMouseRelative(-current_strength, 0)
Sleep(DelayRate)
until not IsMouseButtonPressed(1)
end
until not IsMouseButtonPressed(3)
end
end
else
if IsMouseButtonPressed(3) then
local shots_fired = 0
repeat
if IsMouseButtonPressed(1) then
repeat
shots_fired = shots_fired + 1
local current_strength = RecoilControlStrength + math.floor((shots_fired - 1) / 20)
MoveMouseRelative(0, current_strength)
MoveMouseRelative(-current_strength, 0)
Sleep(DelayRate)
until not IsMouseButtonPressed(1)
end
until not IsMouseButtonPressed(3)
end
end
end
end make this better