View difference between Paste ID: 62XTTZdg and sNRtV2VN
SHOW: | | - or go back to the newest paste.
1
local render = fatality.render
2
local menu = fatality.menu
3
local config = fatality.config
4
local input = fatality.input
5
local entity_list = csgo.interface_handler:get_entity_list()
6
local global_vars = csgo.interface_handler:get_global_vars()
7
8
local screen_size = render:screen_size()
9
10
local fake_mode_item = config:add_item("p9_fake_mode", 0)
11
12
local fake_mode_combo = menu:add_combo("AA Mode", "RAGE", "ANTI-AIM", "General", fake_mode_item)
13
14
local fake_direction_stand = menu:get_reference("RAGE", "ANTI-AIM", "Standing", "Fake amount")
15
local fake_direction_move = menu:get_reference("RAGE", "ANTI-AIM", "Moving", "Fake amount")
16
17
local stand_yaw_add = menu:get_reference("RAGE", "ANTI-AIM", "Standing", "Yaw add")
18
local moving_yaw_add = menu:get_reference("RAGE", "ANTI-AIM", "Moving", "Yaw add")
19
20
local stand_add = menu:get_reference("RAGE", "ANTI-AIM", "Standing", "Add")
21
local moving_add = menu:get_reference("RAGE", "ANTI-AIM", "Moving", "Add")
22
23-
local hotkey = 0x43
23+
local hotkey = 0x56
24
local side = false
25
local tickcount = 0
26
27
local local_player
28
29
local colors =
30
{
31
    blue = csgo.color(0, 100, 255, 255),
32
    green = csgo.color(0, 255, 100, 255)
33
}
34
35
fake_mode_combo:add_item("Manual", fake_mode_item)
36
fake_mode_combo:add_item("Jitter", fake_mode_item)
37
38
-- left true, right false
39
function draw_arrow(x, y, size, color, side)
40
    if(side) then
41
        for i = 0, (size - 1) do
42
            render:rect(x - i, y + (i / 2) + 1, 1, size - i, color)
43
        end
44
    else
45
        for i = 0, (size - 1) do
46
            render:rect(x + i, y + (i / 2) + 1, 1, size - i, color)
47
        end
48
    end
49
end
50
51
function set_direction(val)
52
    fake_direction_stand:set_int(val)
53
    fake_direction_move:set_int(val)
54
end
55
56
function set_add(val)
57
    stand_add:set_int(val)
58
    moving_add:set_int(val)
59
end
60
61
fatality.callbacks:add("events", function(e)
62
    if(e:get_name() == "player_hurt" and fake_mode_randomize_item:get_bool()) then
63
        local hurted_player = entity_list:get_player_from_id(e:get_int("userid"))
64
        local localplayer = entity_list:get_localplayer()
65
        
66
        if(hurted_player:get_index() == local_player:get_index()) then
67
            side = not side
68
        end
69
    end
70
end)
71
72
fatality.callbacks:add("paint", function()
73
    if(tickcount > global_vars.tickcount) then tickcount = 0 end
74
    
75
    local_player = entity_list:get_localplayer()
76
    
77
    if(local_player ~= nil and local_player:is_alive()) then
78
        
79
        if(input:is_key_pressed(hotkey)) then
80
            side = not side
81
        end
82
        
83
        if(fake_mode_item:get_int() == 0) then
84
            if(side) then -- left
85
                draw_arrow(screen_size.x / 2 - 10 - 30, screen_size.y / 2 - 10, 20, colors.green, side)
86
                set_direction(100)
87
set_add(-36)
88
            else -- right
89
                draw_arrow(screen_size.x / 2 + 10 + 30, screen_size.y / 2 - 10, 20, colors.green, side)
90
                set_direction(-100)
91
set_add(40)
92
            end
93
            
94
        elseif(fake_mode_item:get_int() == 1) then
95
            if(global_vars.tickcount > (tickcount + 1)) then
96
                tickcount = global_vars.tickcount
97
                
98
                stand_yaw_add:set_bool(false)
99
                moving_yaw_add:set_bool(false)
100
                
101
                side = not side
102
                if(side) then
103
                    set_direction()
104
                else
105
                    set_direction(100)
106
                end
107
            end
108
        end
109
    end
110
end)