Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --variable definition
- sleeptime = 22
- btn7down = false
- btn8down = false
- shakerecoil = true
- nextlean = "right"
- --func def
- function booltostring(mybool)
- if mybool then
- return "true"
- else
- return "false"
- end
- end
- function OnEvent(event, arg)
- --initialization
- OutputLogMessage("event = %s, arg = %d\n", event, arg)
- -- profile intialization
- if (event == "PROFILE_ACTIVATED") then
- OutputLogMessage("profile activated! everythings on !\n")
- EnablePrimaryMouseButtonEvents(true)
- elseif event == "PROFILE_DEACTIVATED" then
- ReleaseMouseButton(2) -- to prevent it from being stuck on
- end
- --handle recoil (capslock off)
- if (event == "MOUSE_BUTTON_PRESSED" and arg == 1 and IsMouseButtonPressed(3) and shakerecoil and not IsKeyLockOn("capslock")) then
- x = 3
- y = 6
- repeat
- --[[MoveMouseRelative(0, 4)
- Sleep(1)
- MoveMouseRelative(2, 0)
- Sleep(1)
- MoveMouseRelative(-2, -4)
- Sleep(1)
- MoveMouseRelative(-2, 0)
- Sleep(1)
- MoveMouseRelative(2, 4)
- Sleep(1)
- MoveMouseRelative(0, -4)
- Sleep(1)]]
- --[[MoveMouseRelative(0, y)
- Sleep(1)
- MoveMouseRelative(x, 0)
- Sleep(1)
- MoveMouseRelative(-x, -y)
- Sleep(1)
- MoveMouseRelative(-x, 0)
- Sleep(1)
- MoveMouseRelative(x, y)
- Sleep(1)
- MoveMouseRelative(0, -y)
- Sleep(1)]]
- MoveMouseRelative(-1,5)
- Sleep(14)
- MoveMouseRelative(1,-5)
- Sleep(14)
- until not IsMouseButtonPressed(1)
- end
- --[[MoveMouseRelative(0, 1)
- Sleep(sleeptime + 2)
- MoveMouseRelative(0, 2)
- Sleep(sleeptime)]]
- --[[mouseXY(3,0)
- sleep 1
- mouseXY(0,10)
- sleep 1
- mouseXY(-3,-10)
- sleep 1
- mouseXY(-3,0)
- sleep 1
- mouseXY(3,10)
- sleep 1
- mouseXY(0,-10)
- sleep 1 ]]
- if (event == "MOUSE_BUTTON_PRESSED" and arg == 8 ) then
- shakerecoil = not shakerecoil
- OutputLogMessage("shakerecoil:" .. booltostring(shakerecoil) .. "\n")
- end
- --move mouse for spam lean recoil
- if (event == "MOUSE_BUTTON_PRESSED" and arg == 1 and IsMouseButtonPressed(3) and shakerecoil and IsKeyLockOn("capslock")) then
- repeat
- MoveMouseRelative(-1,7)
- Sleep(14)
- MoveMouseRelative(1,-7)
- Sleep(14)
- until not IsMouseButtonPressed(1)
- end
- --lean tool
- --[[if (event == "MOUSE_BUTTON_PRESSED" and arg == 5) then
- if IsMouseButtonPressed(5) then
- if nextlean == "right" then
- PlayMacro("leanleft")
- nextlean = "left"
- else
- PlayMacro("leanright")
- nextlean = "right"
- end
- end]]
- --detect btn 5 press (working)
- --[[btn5keydown = false
- if (event == "MOUSE_BUTTON_PRESSED" and arg == 5) then
- btn5keydown = true
- --OutputLogMessage(booltostring(btn5keydown) .. "\n")
- end
- if (event == "MOUSE_BUTTON_RELEASED" and arg == 5) then
- btn5keydown = false
- --OutputLogMessage(booltostring(btn5keydown) .. "\n")
- end]]
- -- quick peek tool (work)
- --[[if (event == "MOUSE_BUTTON_PRESSED" and arg == 5 ) then --btn5 to peek left
- PressAndReleaseKey("q")
- PressKey("a")
- Sleep(185)
- ReleaseKey("a")
- Sleep(50)
- PressAndReleaseKey("e")
- PressKey("d")
- Sleep(195)
- ReleaseKey("d")
- Sleep(280)
- end
- if (event == "MOUSE_BUTTON_PRESSED" and arg == 4 ) then --btn4 to peek right
- PressAndReleaseKey("e")
- PressKey("d")
- Sleep(185)
- ReleaseKey("d")
- Sleep(50)
- PressAndReleaseKey("q")
- PressKey("a")
- Sleep(195)
- ReleaseKey("a")
- Sleep(280)
- end ]]
- --peek spam (working)
- --[[if (event == "MOUSE_BUTTON_PRESSED" and arg == 5 ) then
- repeat
- PlayMacro("leanleft")
- Sleep(200)
- PlayMacro("leanright")
- Sleep(200)
- until not IsMouseButtonPressed(5)
- end]]
- --[[if (event == "MOUSE_BUTTON_PRESSED" and arg == 4) then
- repeat
- PressMouseButton(3)
- Sleep(55)
- PressMouseButton(1)
- Sleep(20)
- ReleaseMouseButton(1)
- Sleep(20)
- ReleaseMouseButton(3)
- Sleep(50)
- until not IsMouseButtonPressed(4)
- end ]]
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement