Script.lua 3
Script.lua 3
function Move_x(_horizontal_recoil)
MoveMouseRelative(math.floor(Volatility(0.8, 1) * _horizontal_recoil), 0)
end
function Move_y(_vertical_recoil)
MoveMouseRelative(0, math.floor(Volatility(0.8, 1) * _vertical_recoil))
end
function Fire()
local horizontal_recoil = weapon_table["Horizontal"]
local vertical_recoil = weapon_table["Vertical"]
local i = 0
local j = 0
repeat
if horizontal_recoil ~= 0 then
if horizontal_recoil < 0 then
Move_x(horizontal_recoil + float_x)
else
Move_x(vertical_recoil - float_x)
end
end
if vertical_recoil ~= 0 then
if vertical_recoil < 0 then
Move_y(vertical_recoil + float_y)
else
Move_y(vertical_recoil - float_y)
end
end
if float_x ~= 0 then
i = i + float_x
if i >= 1 * Volatility(0.7, 1) then
if horizontal_recoil > 0 then
Move_x(1)
else
Move_x(-1)
end
i = 0
end
end
if float_y ~= 0 then
j = j + float_y
if j >= 1 * Volatility(0.7, 1) then
if vertical_recoil > 0 then
Move_y(1)
else
Move_y(-1)
end
j = 0
end
end
if IsKeyLockOn(toggle_key) then
if is_active == false then
is_active = true
end
function Initialize()
if IsKeyLockOn(toggle_key) then
is_active = true
else
is_active = false
end
end
Initialize()