script_name('Arizona Render')--инва скрипта
script_author('Stenford')
script_version('1') --версия скрипта для автообновы
 
objects = {} -- создаём массив для хранения объектов
objects_rotation = {} -- создаём отдельный массив для вращения
objects_collision = {} -- создаём отдельный массив для хранения коллизии
objects_3DTexts = {} -- создаём отдельный массив для 3D текстов
-- Можно было объединить эти массивы, но я подумал об этих функциях поздно и мне было лень исправлять весь код
last_object = -1 -- последний выбранный объект, для редактирования

local  deltext=false
 local ti=1
  texttext='Автор скрипта: Тут могла быть ваша реклама - t.me/stenford; Стен#1111'
local libs = {--cпасибо Чапе за реализацию этой подгрузки библиотек
    sampev = {
        name = 'SAMP.lua', folder = 'samp',
        files = {
            {name = 'events.lua', link = "https://raw.githubusercontent.com/THE-FYP/SAMP.Lua/master/samp/events.lua"},
            {name = 'raknet.lua', link = "https://raw.githubusercontent.com/THE-FYP/SAMP.Lua/master/samp/raknet.lua"},
            {name = 'utils.lua', link = "https://raw.githubusercontent.com/THE-FYP/SAMP.Lua/master/samp/events/utils.lua"},
            {name = 'handlers.lua', link = "https://raw.githubusercontent.com/THE-FYP/SAMP.Lua/master/samp/events/handlers.lua"},
            {name = 'extra_types.lua', link = "https://raw.githubusercontent.com/THE-FYP/SAMP.Lua/master/samp/events/extra_types.lua"},
            {name = 'bitstream_io.lua', link = "https://raw.githubusercontent.com/THE-FYP/SAMP.Lua/master/samp/events/bitstream_io.lua"},
            {name = 'core.lua', link = "https://raw.githubusercontent.com/THE-FYP/SAMP.Lua/master/samp/events/core.lua"},
        },
    },
	 eventss = {
        name = 'events', folder = 'samp//events',
        files = {
            {name = 'bitstream_io.lua', link = "https://raw.githubusercontent.com/THE-FYP/SAMP.Lua/master/samp/events/bitstream_io.lua"},
            {name = 'core.lua', link = "https://raw.githubusercontent.com/THE-FYP/SAMP.Lua/master/samp/events/core.lua"},
            {name = 'extra_types.lua', link = "https://raw.githubusercontent.com/THE-FYP/SAMP.Lua/master/samp/events/extra_types.lua"},
            {name = 'handlers.lua', link = "https://raw.githubusercontent.com/THE-FYP/SAMP.Lua/master/samp/events/handlers.lua"},
            {name = 'handlers.lua', link = "https://raw.githubusercontent.com/THE-FYP/SAMP.Lua/master/samp/events/utils.lua"},
        },
    },
	 img = {
        name = 'imgui', folder = '',
        files = {
            {name = 'imgui.lua', link = "http://stenford.fun/imgui.lua"},
            {name = 'MoonImGui.dll', link = "http://stenford.fun/MoonImGui.dll"},
         
        },
    },
	 faw = {
        name = 'fAwesome5', folder = '',
        files = {
            {name = 'fAwesome5.lua', link = "http://stenford.fun/fAwesome5.lua"},
         
        },
    },
	 faw2 = {
        name = 'fa-solid-900.ttf', folder = '',
        files = {
            {name = 'fa-solid-900.ttf', link = "http://stenford.fun/fa-solid-900.ttf"},
         
        },
    },
	 add = {
        name = 'imgui_addons.lua', folder = '',
        files = {
            {name = 'imgui_addons.lua', link = "https://www.blast.hk/attachments/22563"},
         
        },
    }
}



function loadLib(lib_data)
    local dlstatus = require('moonloader').download_status
    local loadPath = ''
    if lib_data.folder ~= '' then
        if not doesDirectoryExist(getWorkingDirectory()..'\\lib\\'..lib_data.folder) then
            createDirectory(getWorkingDirectory()..'\\lib\\'..lib_data.folder)
            print('Folder '..getWorkingDirectory()..'\\lib\\'..lib_data.folder..' created!')
        end
        loadPath = getWorkingDirectory()..'\\lib\\'..lib_data.folder..'\\'
    else
        loadPath = getWorkingDirectory()..'\\lib\\'
    end
    local files = table.getn(lib_data.files)
    local exists = 0
    for i = 1, table.getn(lib_data.files) do
        if doesFileExist(loadPath..lib_data.files[i].name) then
            exists = exists + 1
        end
    end
    if exists ~= files then
        for i = 1, table.getn(lib_data.files) do
            if doesFileExist(loadPath..lib_data.files[i].name) then
                print('error, file "'..loadPath..lib_data.files[i].name..'" already exists!')
            else
                downloadUrlToFile(lib_data.files[i].link, loadPath..lib_data.files[i].name, function (id, status, p1, p2)
                 
                end)
            end
        end
    end
end

loadLib(libs.sampev)
loadLib(libs.eventss)
loadLib(libs.img)
loadLib(libs.faw)
loadLib(libs.faw2)

 
thisScript():reload()

local ng = false
local spr = false
local summer = false
local autumn = false
local winter = false
local ua = false
local mart8 = false
local dr = false
local fev14 = false
local fev23 = false
tag='{7c2a36}[ARZR]: {ffdbc2}'--тег для sampAddChatMessage 
require "moonloader"--подключение библиотек
local bLib = {}
bLib['imgui'], 	imgui 	= pcall(require, 'imgui')--
bLib['Samp.lua'], 	sampev 	= pcall(require, 'lib.samp.events')--
bLib['ffi'], 	ffi 	= pcall(require, 'ffi')--
bLib['memory'], 	mem 	= pcall(require, 'memory')--
bLib['inicfg'], 	inicfg 	= pcall(require, 'inicfg')--
bLib['encoding'], 	encoding 	= pcall(require, 'encoding')--
bLib['fAwesome5'], 	fa 	= pcall(require, 'fAwesome5')--
bLib['vkeys'], 	vkeys 	= pcall(require, 'vkeys')--

bLib['imgui_addons'], 	imgui_addons = pcall(require,('imgui_addons'))--fa-solid-900.ttf
   
 

local getBonePosition = ffi.cast("int (__thiscall*)(void*, float*, int, bool)", 0x5E4280)

KEY = VK_F5--
local main_window_state = imgui.ImBool(false)--переменная активности имгуи окон
local main_window_state2 = imgui.ImBool(false)
local main_window_state3 = imgui.ImBool(false)
local olen = imgui.ImBool(false)--переменные чекбоксов объектов
local graffiti = imgui.ImBool(false)
local narko = imgui.ImBool(false)
local podarok = imgui.ImBool(false)
local odejda = imgui.ImBool(false)
local ryda = imgui.ImBool(false)
local klad = imgui.ImBool(false)
local gun = imgui.ImBool(false)
local semena = imgui.ImBool(false)
local nicks  = imgui.ImBool(false)
local skelet  = imgui.ImBool(false)
local lenn  = imgui.ImBool(false)
local hlopok  = imgui.ImBool(false)


local ngpodarok  = imgui.ImBool(false)
local nglavina  = imgui.ImBool(false)
local ngresi  = imgui.ImBool(false)

local dis =  imgui.ImBool(false)--дистанция

local rai =  imgui.ImBool(false)--радужный режим


local c1 = imgui.ImFloat4(0, 0, 0, 255)--хз зачем это, вроде для выбора цвета
local c2 = imgui.ImFloat4(0, 0, 0, 255)
local c3 = imgui.ImFloat4(0, 0, 0, 255)
local c4 = imgui.ImFloat4(0, 0, 0, 255)
local c5 = imgui.ImFloat4(0, 0, 0, 255)
local c6 = imgui.ImFloat4(0, 0, 0, 255)
local c7 = imgui.ImFloat4(0, 0, 0, 255)
local c8 = imgui.ImFloat4(0, 0, 0, 255)
local c9 = imgui.ImFloat4(0, 0, 0, 255)
local c10 = imgui.ImFloat4(0, 0, 0, 255)
local c11 = imgui.ImFloat4(0, 0, 0, 255)

local c12 = imgui.ImFloat4(0, 0, 0, 255)
local c13 = imgui.ImFloat4(0, 0, 0, 255)
local c14 = imgui.ImFloat4(0, 0, 0, 255)


local textSize = 164


	imgui.ToggleButton = require('imgui_addons').ToggleButton--вторая часть подключения библиотек


local tres = imgui.ImBool(false)--перемненная работа трейсеров

 raz = 0--для чего-то нужна

local rotate = false--переменная для проверки на смену местоположение
local rotate2 = false--переменная для проверки на смену местоположение

local work = true--переменная работы

local narkok=0--переменные для статистики о предметах
local graffitik=0
local olenk=0
local podarokk=0
local odejdak=0
local rydak=0
local kladk=0
local gunk=0
local semenak=0
local lennk=0
local hlopokk=0

local sre = false--не помню зачем

local rx=1--переменные для установи статистики в нужные коардинаты
local ryy=111

local stats = imgui.ImBool(false)--переменная для отображения статы
local nol = imgui.ImBool(false)--переменная для отображения "0"

local ggrove = imgui.ImBool(false)--переменные для выбранных граффити
local gballas = imgui.ImBool(false)
local gvagos = imgui.ImBool(false)
local grifa = imgui.ImBool(false)
local gaztecas = imgui.ImBool(false)
local gwolf = imgui.ImBool(false)
local nickcheck = imgui.ImBool(false)
local skeletcheck = imgui.ImBool(false)

local font = renderCreateFont("Arial", 30, 4)--шрифт для текста

encoding.default = "CP1251"--штучка для кодировки в русских элементах
u8 = encoding.UTF8

local variable = imgui.ImInt(0)--переменные для выбора цвета
local variable2 = imgui.ImInt(0)
local variable3 = imgui.ImInt(0)
local variable4 = imgui.ImInt(0)
local variable5 = imgui.ImInt(0)
local variable6 = imgui.ImInt(0)
local variable7 = imgui.ImInt(0)
local variable8 = imgui.ImInt(0)
local variable9 = imgui.ImInt(0)
local variable10 = imgui.ImInt(0)
local variable11 = imgui.ImInt(0)

local variable12 = imgui.ImInt(0)
local variable13 = imgui.ImInt(0)
local variable14 = imgui.ImInt(0)

local slider = imgui.ImInt(50)
local speeed = imgui.ImInt(50)
local massiv = {u8'Красный', u8'Оранжевый', u8'Желтый', u8'Зеленый', u8'Голубой', u8'Синий', u8'Фиолетовый'}--массив с цветами

local styleimgui = imgui.ImInt(0)--imguistyle
local massivwithstyle = {u8'Красная тема', u8'Оранжевая тема', u8'Желтая тема', u8'Зеленая тема', u8'Голубая тема', u8'Синяя тема', u8'Фиолетовая тема',u8'Темная тема',u8'Серая  тема',u8'Светлая тема',u8'Коричневая тема',u8'Блевотно-салатовая тема',u8'Вишневая тема',u8'Бардовая тема',u8'Гламурная розовая тема',u8'Салатовая тема',u8'Темно-зеленая тема',u8'BlastHack тема',u8'Хеллоуинская тема',u8'Новогодняя тема',u8'"День Рождения" тема',u8'"14 февраля" тема',u8'"23 февраля" тема',u8'"8 марта" тема',u8'Українська тема',u8'Зимняя тема',u8'Осенняя тема',u8'Летняя тема',u8'Весенняя тема'}--массив со стилями

local cmd= imgui.ImBuffer(256)--переменная для выбора команды активации

sizetr = imgui.ImInt(3)--переменная толщины трейсеров
sizetext = imgui.ImInt(3)--переменная толщины текста

textures = { --текстурки рвх
	['cs_rockdetail2'] = 1, 
	['ab_flakeywall'] = 2,  
	['metalic128'] = 3,    
	['Strip_Gold'] = 4,	   
	['gold128'] = 5       
}

statss = { --переменые для статы
	['stone'] = 0,
	['metal'] = 0,
	['silver'] = 0,
	['bronze'] = 0,
	['gold'] = 0,
	['total'] = 0
}

resNames = {{'Камень', 0xFFFFFFFF}, {'Металл', 0xFF808080}, {'Серебро', 0xFF00BFFF}, {'Бронза', 0xFF654321}, {'Золото', 0xFFFFFF00}}--названия руд + цвет к ним

resources = {}--массив ресов
textsTable = {}
text=u8' Aizona Render by Stenford v2.'..thisScript().version 
textstats=u8' Статистика'
local directIni = 'ARZRbyStenford.ini'--сохранение настроек
local mainini = inicfg.load(inicfg.load({
    settings = {
        olen=false,
		graffiti=false,
		narko=false,
		podarok=false,
		odejda=false,
		ryda=false,
		klad=false,
		gun=false,
		semena=false,
		stats=true,
		lenn=false,
		hlopok=false,
		ggrove=true,
		gballas=true,
		gvagos=true,
		grifa=true,
		ngpodarok=false,
		nglavina=false,
		ngresi=false,
		speeed=10,
		gaztecas=true,
		rx=1,
		ryy=1,
		gwolf=true,
		nol=false,
		c1='FFff004d',
		c2='FFFFFFFF',
		c3='FFFFFFFF',
		c4='FFFFFFFF',
		c5='FFFFFFFF',
		c6='FFFFFFFF',
		c7='FFFFFFFF',
		c8='FFFFFFFF',
		c9='FFFFFFFF',
		c10='FFFFFFFF',
		c11='FFFFFFFF',
		c12='FFFFFFFF',
		c13='FFFFFFFF',
		c14='FFFFFFFF',
		tres=true,
		variable=0,
		variable2=0,
		variable3=0,
		variable4=0,
		variable5=0,
		variable6=0,
		variable7=0,
		variable8=0,
		variable9=0,
		variable10=0,
		variable11=0,
		variable12=0,
		variable13=0,
		variable14=0,
		sizetr=3,
		rai=false,
		sizetext=12,
		cmd='arzr',
		work=true,
		skelet=false,
		skeletcheck=false,
		nicks=false,
		nickcheck=false,
		defaultState=false,
		dis=true,
		style=1,
		slider=100
    },
}, directIni))

styleimgui.v=mainini.settings.style
slider.v=mainini.settings.slider
prozr=slider.v/100
local maincfg = inicfg.load({--конфиг для хоткеев
	config = {
		tifloppa = true
	},
	hotkeys = {
	bindText = VK_R,
	nefloppa = VK_U,
	nefloppa2 = VK_L
	}
},'aarzhot.ini')
inicfg.save(maincfg,'aarzhot.ini')


function join_argb(a, r, g, b)--функция для работы с цветом
    local argb = b  -- b
    argb = bit.bor(argb, bit.lshift(g, 8))  -- g
    argb = bit.bor(argb, bit.lshift(r, 16)) -- r
    argb = bit.bor(argb, bit.lshift(a, 24)) -- a
    return argb
end

function explode_argb(argb)-- еще одна функция для работы с цветом
    local a = bit.band(bit.rshift(argb, 24), 0xFF)
    local r = bit.band(bit.rshift(argb, 16), 0xFF)
    local g = bit.band(bit.rshift(argb, 8), 0xFF)
    local b = bit.band(argb, 0xFF)
    return a, r, g, b
end

function converct(argb)--конвертация цвета
    a = bit.band(bit.rshift(argb, 24), 0xFF)
    r = bit.band(bit.rshift(argb, 16), 0xFF)
    g = bit.band(bit.rshift(argb, 8), 0xFF)
    b = bit.band(argb, 0xFF)
    return a/255, r/255, g/255, b/255
end

function argb_to_rgba(argb)
  local a, r, g, b = explode_argb(argb)
  return join_argb(r, g, b, a)
end

function loadd()
olen.v=mainini.settings.olen--подгрузка настроек из конфига
	graffiti.v=mainini.settings.graffiti
	narko.v=mainini.settings.narko
	podarok.v=mainini.settings.podarok
	odejda.v=mainini.settings.odejda
	ryda.v=mainini.settings.ryda
	klad.v=mainini.settings.klad
	rai.v=mainini.settings.rai
	gun.v=mainini.settings.gun
	lenn.v=mainini.settings.lenn
	hlopok.v=mainini.settings.hlopok
	semena.v=mainini.settings.semena
	stats.v=mainini.settings.stats
	work = mainini.settings.work
	nicks.v = mainini.settings.nicks
	skelet.v = mainini.settings.skelet
	nickcheck.v = mainini.settings.nickcheck
	skeletcheck.v = mainini.settings.skeletcheck
	ggrove.v=mainini.settings.ggrove
	gballas.v=mainini.settings.gballas
	gvagos.v=mainini.settings.gvagos
	grifa.v=mainini.settings.grifa
	gaztecas.v=mainini.settings.gaztecas
	gwolf.v=mainini.settings.gwolf
	tres.v=mainini.settings.tres
	nol.v=mainini.settings.nol
	speeed.v=mainini.settings.speeed
	rx=mainini.settings.rx
	ryy=mainini.settings.ryy
	variable.v = mainini.settings.variable
	variable2.v = mainini.settings.variable2
	variable3.v = mainini.settings.variable3
	variable4.v = mainini.settings.variable4
	variable5.v = mainini.settings.variable5
	variable6.v = mainini.settings.variable6
	variable7.v = mainini.settings.variable7
	variable8.v = mainini.settings.variable8
	variable9.v = mainini.settings.variable9
	variable10.v = mainini.settings.variable10
	variable11.v = mainini.settings.variable11
	
	variable12.v = mainini.settings.variable12
	variable13.v = mainini.settings.variable13
	variable14.v = mainini.settings.variable14
	
	
	
	defaultState=mainini.settings.defaultState
	sizetext.v = mainini.settings.sizetext
	sizetr.v = mainini.settings.sizetr
	cmd.v = mainini.settings.cmd
	dis.v = mainini.settings.dis
	
	ngpodarok.v = mainini.settings.ngpodarok
	nglavina.v = mainini.settings.nglavina
	ngresi.v = mainini.settings.ngresi
end

function main() if not isSampfuncsLoaded() or not isSampLoaded() then return end--главный цикл
    while not isSampAvailable() do wait(100) end

	
	hotkeys = {--массив хоткеев
		bindText = { name = vkeys.key_names[maincfg.hotkeys.bindText], edit = false, ticked = os.clock(), tickedState = false, sName = "Фаст выключение" },
		nefloppa = { name = vkeys.key_names[maincfg.hotkeys.nefloppa], edit = false, ticked = os.clock(), tickedState = false, sName =  "Вх на ники"},
		nefloppa2 = { name = vkeys.key_names[maincfg.hotkeys.nefloppa2], edit = false, ticked = os.clock(), tickedState = false, sName = "Cкелеты"}
		}
	
	loadd()
	
	

	
	sampRegisterChatCommand(cmd.v,cmd_work)--регистрация команды активации скрипта

	if stats.v == true then--отображение статистики
		main_window_state3.v=true 
	else
		main_window_state3.v = false 
	end
	
	font = renderCreateFont("Arial", sizetext.v, 4)--создание шрифта


	
	if narko.v then --суммирует количество выбранных объектов для рендера
		raz = raz+1 
	end --
	if graffiti.v then 
		raz = raz+1 
	end --
	if olen.v then 
		raz = raz+1
	end --
	if podarok.v then 
		raz = raz+1 
	end --
	if odejda.v then 
		raz = raz+1 
	end --
	if ryda.v then 
		raz = raz+1 
	end --
	if klad.v then 
		raz = raz+1 
	end --
	if gun.v then 
		raz = raz+1
	end --
	if semena.v then 
		raz = raz+1 
	end --
	if lenn.v then 
		raz = raz+1 
	end --
	if hlopok.v then 
		raz = raz+1 
	end --
	
	razz = 23+raz * 17--задает размер окна со статистикой по количеству объектов

	if defaultState then--включение вх на ники
		if whVisible ~= "bones" and not nameTag then 
			nameTagOn() 
		end
		while isKeyDown(maincfg.hotkeys.nefloppa) do wait(100) end 
	else
				
	end 


	if variable.v == 0 then colo = '0xFFFF0000' end--задание трейсерам и тексту выбранных в настройках цвета (в будущем будет через цикл, да)
	if variable.v == 1 then colo = '0xFFFF8000' end
	if variable.v == 2 then colo = '0xFFffff00' end
	if variable.v == 3 then colo = '0xFF00ff00' end
	if variable.v == 4 then colo = '0xFF00bfff' end
	if variable.v == 5 then colo = '0xFF0000ff' end
	if variable.v == 6 then colo = '0xFF8000FF' end			
	if variable2.v == 0 then colo2 = '0xFFFF0000' end
	if variable2.v == 1 then colo2 = '0xFFFF8000' end
	if variable2.v == 2 then colo2 = '0xFFffff00' end
	if variable2.v == 3 then colo2 = '0xFF00ff00' end
	if variable2.v == 4 then colo2 = '0xFF00bfff' end
	if variable2.v == 5 then colo2 = '0xFF0000ff' end
	if variable2.v == 6 then colo2 = '0xFF8000FF' end	
	if variable3.v == 0 then colo3 = '0xFFFF0000' end
	if variable3.v == 1 then colo3 = '0xFFFF8000' end
	if variable3.v == 2 then colo3 = '0xFFffff00' end
	if variable3.v == 3 then colo3 = '0xFF00ff00' end
	if variable3.v == 4 then colo3 = '0xFF00bfff' end
	if variable3.v == 5 then colo3 = '0xFF0000ff' end
	if variable3.v == 6 then colo3 = '0xFF8000FF' end
	if variable4.v == 0 then colo4 = '0xFFFF0000' end
	if variable4.v == 1 then colo4 = '0xFFFF8000' end
	if variable4.v == 2 then colo4 = '0xFFffff00' end
	if variable4.v == 3 then colo4 = '0xFF00ff00' end
	if variable4.v == 4 then colo4 = '0xFF00bfff' end
	if variable4.v == 5 then colo4 = '0xFF0000ff' end
	if variable4.v == 6 then colo4 = '0xFF8000FF' end	
	if variable5.v == 0 then colo5 = '0xFFFF0000' end
	if variable5.v == 1 then colo5 = '0xFFFF8000' end
	if variable5.v == 2 then colo5 = '0xFFffff00' end
	if variable5.v == 3 then colo5 = '0xFF00ff00' end
	if variable5.v == 4 then colo5 = '0xFF00bfff' end
	if variable5.v == 5 then colo5 = '0xFF0000ff' end
	if variable5.v == 6 then colo5 = '0xFF8000FF' end
	if variable6.v == 0 then colo6 = '0xFFFF0000' end
	if variable6.v == 1 then colo6 = '0xFFFF8000' end
	if variable6.v == 2 then colo6 = '0xFFffff00' end
	if variable6.v == 3 then colo6 = '0xFF00ff00' end
	if variable6.v == 4 then colo6 = '0xFF00bfff' end
	if variable6.v == 5 then colo6 = '0xFF0000ff' end
	if variable6.v == 6 then colo6 = '0xFF8000FF' end	
	if variable7.v == 0 then colo7 = '0xFFFF0000' end
	if variable7.v == 1 then colo7 = '0xFFFF8000' end
	if variable7.v == 2 then colo7 = '0xFFffff00' end
	if variable7.v == 3 then colo7 = '0xFF00ff00' end
	if variable7.v == 4 then colo7 = '0xFF00bfff' end
	if variable7.v == 5 then colo7 = '0xFF0000ff' end
	if variable7.v == 6 then colo7 = '0xFF8000FF' end
	if variable8.v == 0 then colo8 = '0xFFFF0000' end
	if variable8.v == 1 then colo8 = '0xFFFF8000' end
	if variable8.v == 2 then colo8 = '0xFFffff00' end
	if variable8.v == 3 then colo8 = '0xFF00ff00' end
	if variable8.v == 4 then colo8 = '0xFF00bfff' end
	if variable8.v == 5 then colo8 = '0xFF0000ff' end
	if variable8.v == 6 then colo8 = '0xFF8000FF' end
	if variable9.v == 0 then colo9 = '0xFFFF0000' end
	if variable9.v == 1 then colo9 = '0xFFFF8000' end
	if variable9.v == 2 then colo9 = '0xFFffff00' end
	if variable9.v == 3 then colo9 = '0xFF00ff00' end
	if variable9.v == 4 then colo9 = '0xFF00bfff' end
	if variable9.v == 5 then colo9 = '0xFF0000ff' end
	if variable9.v == 6 then colo9 = '0xFF8000FF' end
	if variable10.v == 0 then colo10 = '0xFFFF0000' end--задание трейсерам и тексту выбранных в настройках цвета (в будущем будет через цикл, да)
	if variable10.v == 1 then colo10 = '0xFFFF8000' end
	if variable10.v == 2 then colo10 = '0xFFffff00' end
	if variable10.v == 3 then colo10 = '0xFF00ff00' end
	if variable10.v == 4 then colo10 = '0xFF00bfff' end
	if variable10.v == 5 then colo10 = '0xFF0000ff' end
	if variable10.v == 6 then colo10 = '0xFF8000FF' end
	if variable11.v == 0 then colo11 = '0xFFFF0000' end--задание трейсерам и тексту выбранных в настройках цвета (в будущем будет через цикл, да)
	if variable11.v == 1 then colo11 = '0xFFFF8000' end
	if variable11.v == 2 then colo11 = '0xFFffff00' end
	if variable11.v == 3 then colo11 = '0xFF00ff00' end
	if variable11.v == 4 then colo11 = '0xFF00bfff' end
	if variable11.v == 5 then colo11 = '0xFF0000ff' end
	if variable11.v == 6 then colo11 = '0xFF8000FF' end
	
	if variable12.v == 0 then colo12 = '0xFFFF0000' end--задание трейсерам и тексту выбранных в настройках цвета (в будущем будет через цикл, да)
	if variable12.v == 1 then colo12 = '0xFFFF8000' end
	if variable12.v == 2 then colo12 = '0xFFffff00' end
	if variable12.v == 3 then colo12 = '0xFF00ff00' end
	if variable12.v == 4 then colo12 = '0xFF00bfff' end
	if variable12.v == 5 then colo12 = '0xFF0000ff' end
	if variable12.v == 6 then colo12 = '0xFF8000FF' end
	
	if variable13.v == 0 then colo13 = '0xFFFF0000' end--задание трейсерам и тексту выбранных в настройках цвета (в будущем будет через цикл, да)
	if variable13.v == 1 then colo13 = '0xFFFF8000' end
	if variable13.v == 2 then colo13 = '0xFFffff00' end
	if variable13.v == 3 then colo13 = '0xFF00ff00' end
	if variable13.v == 4 then colo13 = '0xFF00bfff' end
	if variable13.v == 5 then colo13 = '0xFF0000ff' end
	if variable13.v == 6 then colo13 = '0xFF8000FF' end
	
	if variable14.v == 0 then colo14 = '0xFFFF0000' end--задание трейсерам и тексту выбранных в настройках цвета (в будущем будет через цикл, да)
	if variable14.v == 1 then colo14 = '0xFFFF8000' end
	if variable14.v == 2 then colo14 = '0xFFffff00' end
	if variable14.v == 3 then colo14 = '0xFF00ff00' end
	if variable14.v == 4 then colo14 = '0xFF00bfff' end
	if variable14.v == 5 then colo14 = '0xFF0000ff' end
	if variable14.v == 6 then colo14 = '0xFF8000FF' end
	
	
		load_photo()
	
	
	image = imgui.CreateTextureFromFile("moonloader/config/photoforngstyle.jpg")
	imagedr = imgui.CreateTextureFromFile("moonloader/config/photofordrstyle.jpg")
	imagefev14 = imgui.CreateTextureFromFile("moonloader/config/photoforfev14style.jpg")
	imagefev23 = imgui.CreateTextureFromFile("moonloader/config/photoforfev23style.jpg")
	imagemart8 = imgui.CreateTextureFromFile("moonloader/config/photoformart8style.jpg")
	imageua = imgui.CreateTextureFromFile("moonloader/config/photoforuastyle.jpg")
	imagewinter = imgui.CreateTextureFromFile("moonloader/config/photoforwinterstyle.jpg") 
	imageautumn = imgui.CreateTextureFromFile("moonloader/config/photoforautumnstyle.jpeg")
	imagesummer = imgui.CreateTextureFromFile("moonloader/config/photoforsummerstyle.jpg")
	imagespr = imgui.CreateTextureFromFile("moonloader/config/photoforsprstyle.jpg")
	--photoforngstyle
	timertext()
	while true do--вечный цикл
		wait(1)
		
		
   local r, g, b, a = rainbow(speeed.v, 255, 120)
        local hex = join_argb(a, r, g, b) -- out: 0xFF......
        local hex = string.sub(bit.tohex(hex), 3, 8)
        
		if (wasKeyPressed(maincfg.hotkeys.nefloppa))and(nickcheck.v) and not isSampfuncsConsoleActive() and not sampIsChatInputActive() and not sampIsDialogActive() and not isPauseMenuActive() then; --включение вх на ники по хоткею
			if defaultState then
				defaultState = false; 
				mainini.settings.defaultState = defaultState
				inicfg.save(mainini,directini)
				nameTagOff(); 
				while isKeyDown(maincfg.hotkeys.nefloppa) do wait(100) end 
			else
				defaultState = true;
				mainini.settings.defaultState = defaultState
				inicfg.save(mainini,directini)
				if whVisible ~= "bones" and not nameTag then nameTagOn() end
				while isKeyDown(maincfg.hotkeys.nefloppa) do wait(100) end 
			end 
		end
		
		if (wasKeyPressed(maincfg.hotkeys.nefloppa2))and(skeletcheck.v)  and not isSampfuncsConsoleActive() and not sampIsChatInputActive() and not sampIsDialogActive() and not isPauseMenuActive()then; --включение вх на скелеты по хоткею
			if skelet.v then
				skelet.v = false; 
				mainini.settings.skelet = skelet.v
				inicfg.save(mainini,directini)
				while isKeyDown(maincfg.hotkeys.nefloppa2) do wait(100) end 
			else
				skelet.v = true;
				mainini.settings.skelet = skelet.v
				inicfg.save(mainini,directini)
				--if whVisible ~= "bones" and not nameTag then nameTagOn() end
				while isKeyDown(maincfg.hotkeys.nefloppa2) do wait(100) end 
			end 
		end
				
		if skelet.v  then--работа вх на скелеты
			if not isPauseMenuActive() and not isKeyDown(VK_F8) then
				for i = 0, sampGetMaxPlayerId() do
				if sampIsPlayerConnected(i) then
					local result, cped = sampGetCharHandleBySampPlayerId(i)
					local color = sampGetPlayerColor(i)
					local aa, rr, gg, bb = explode_argb(color)
					local color = join_argb(255, rr, gg, bb)
					if result then
						if doesCharExist(cped) and isCharOnScreen(cped) then
							local t = {3, 4, 5, 51, 52, 41, 42, 31, 32, 33, 21, 22, 23, 2}
							for v = 1, #t do
								pos1X, pos1Y, pos1Z = getBodyPartCoordinates(t[v], cped)
								pos2X, pos2Y, pos2Z = getBodyPartCoordinates(t[v] + 1, cped)
								pos1, pos2 = convert3DCoordsToScreen(pos1X, pos1Y, pos1Z)
								pos3, pos4 = convert3DCoordsToScreen(pos2X, pos2Y, pos2Z)
								renderDrawLine(pos1, pos2, pos3, pos4, 1, color)
							end
							for v = 4, 5 do
								pos2X, pos2Y, pos2Z = getBodyPartCoordinates(v * 10 + 1, cped)
								pos3, pos4 = convert3DCoordsToScreen(pos2X, pos2Y, pos2Z)
								renderDrawLine(pos1, pos2, pos3, pos4, 1, color)
							end
							local t = {53, 43, 24, 34, 6}
							for v = 1, #t do
								posX, posY, posZ = getBodyPartCoordinates(t[v], cped)
								pos1, pos2 = convert3DCoordsToScreen(posX, posY, posZ)
							end
						end
					end
				end
			end
		else
				nameTagOff()
				while isPauseMenuActive() or isKeyDown(VK_F8) do wait(0) end
				nameTagOn()
			end
		end
		
		if isKeyJustPressed(maincfg.hotkeys.bindText) and not isSampfuncsConsoleActive() and not sampIsChatInputActive() and not sampIsDialogActive() and not isPauseMenuActive() then--отключение скрипта по хоткею
			work = not work
			if work then 
				printStringNow('~g~ +',1000) 
				mainini.settings.stats=stats.v
				imgui.ShowCursor = false
				if stats.v == true then 
					main_window_state3.v=true 
				else 
					main_window_state3.v = false 
				end
			else	
				printStringNow('~r~ -',1000) 
				mainini.settings.stats=stats.v
				imgui.ShowCursor = false
				if stats.v == true then 
					main_window_state3.v=true 
				else 
					main_window_state3.v = false 
				end
			end
			mainini.settings.work = work
			inicfg.save(mainini,directini)
		end
		
		raz = 0
		imgui.Process = true
		imgui.ShowCursor = false
		mestoo()
		
		if (ngpodarok.v or nglavina.v or ngresi.v)or((lenn.v)or(hlopok.v)or(narko.v) or(graffiti.v) or(olen.v) or(podarok.v) or(odejda.v) or(ryda.v) or(klad.v) or(gun.v) or(semena.v ))and (work)and not isKeyDown(VK_F8) then--проверка на работу хотя бы одного из вх (если офнуты все вх - не будет выполняться код ниже, для апа фпс крч)
			
			if sre == true then--если увеличивается размер шрифта - sre присваивается tru, а после уже пересоздается фон с нужной шириной. Для фпс апа сделано
				font = renderCreateFont("Arial", sizetext.v, 4) 
				sre = false 
			end
			
			narkok=0--обнуление статистики
			graffitik=0
			olenk=0
			podarokk=0
			odejdak=0
			rydak=0
			kladk=0
			gunk=0
			semenak=0
			lennk=0
			hlopokk=0
			
			for _, v in pairs(getAllObjects()) do--цикл на поиск объектов вокруг перса
				local asd
				if sampGetObjectSampIdByHandle(v) ~= -1 then
					asd = sampGetObjectSampIdByHandle(v)
				end
				
				local distext = ''
				
				if olen.v then--если включен вх на оленей выполняется код ниже
					local model = getObjectModel(v)--получение айди объекта
					if (model == 19315)  then--проверка на айди объекта. если совпадает с моделькой оленя - рендерим
						olenk=olenk+1
						local _, x, y, z = getObjectCoordinates(v)--получение координат объекта
						if isPointOnScreen(x, y, z) then--если олень на экране
							local x1, y1 = convert3DCoordsToScreen(x,y,z)--конвертация в векторные
							local x2,y2,z2 = getCharCoordinates(PLAYER_PED)--получение координат игрока
							local x10, y10 = convert3DCoordsToScreen(x2,y2,z2)--конвертация корд игрока
							if dis.v then
								local distance = string.format("%.1f", getDistanceBetweenCoords3d(x, y, z, x2, y2, z2))--получение дистанции в метрах
								distext='('..distance..'м.)'
							end
							if rai.v then
														renderFontDrawText(font, "Олень"..distext, x1, y1, '0xFF'..hex)

							else
							renderFontDrawText(font, "Олень"..distext, x1, y1, colo)
end
							if tres.v then 
							if rai.v then
							renderDrawLine(x10, y10, x1, y1, sizetr.v, '0xFF'..hex)
							else
								renderDrawLine(x10, y10, x1, y1, sizetr.v, colo)
							end
							end
						end
					end
				end
				
				
				if ngpodarok.v then--если включен вх на оленей выполняется код ниже
					local model = getObjectModel(v)--получение айди объекта
					if (model == 19055)or(model == 19056)or(model == 19057)or(model == 19058) or(model == 19054)   then--проверка на айди объекта. если совпадает с моделькой оленя - рендерим
						 
						local _, x, y, z = getObjectCoordinates(v)--получение координат объекта
						if isPointOnScreen(x, y, z) then--если олень на экране
							local x1, y1 = convert3DCoordsToScreen(x,y,z)--конвертация в векторные
							local x2,y2,z2 = getCharCoordinates(PLAYER_PED)--получение координат игрока
							local x10, y10 = convert3DCoordsToScreen(x2,y2,z2)--конвертация корд игрока
							if dis.v then
								local distance = string.format("%.1f", getDistanceBetweenCoords3d(x, y, z, x2, y2, z2))--получение дистанции в метрах
								distext='('..distance..'м.)'
							end
							if rai.v then
														renderFontDrawText(font, "Подарок"..distext, x1, y1, '0xFF'..hex)

							else
							renderFontDrawText(font, "Подарок"..distext, x1, y1, colo12)
end
							if tres.v then 
							if rai.v then
							renderDrawLine(x10, y10, x1, y1, sizetr.v, '0xFF'..hex)
							else
								renderDrawLine(x10, y10, x1, y1, sizetr.v, colo12)
							end
							end
						end
					end
				end
				
				if ngresi.v then--если включен вх на оленей выполняется код ниже
					local model = getObjectModel(v)--получение айди объекта
					if (model == 1852)or(model == 842)or(model == 902)    then--проверка на айди объекта. если совпадает с моделькой оленя - рендерим
						 
						local _, x, y, z = getObjectCoordinates(v)--получение координат объекта
						if isPointOnScreen(x, y, z) then--если олень на экране
							local x1, y1 = convert3DCoordsToScreen(x,y,z)--конвертация в векторные
							local x2,y2,z2 = getCharCoordinates(PLAYER_PED)--получение координат игрока
							local x10, y10 = convert3DCoordsToScreen(x2,y2,z2)--конвертация корд игрока
							if dis.v then
								local distance = string.format("%.1f", getDistanceBetweenCoords3d(x, y, z, x2, y2, z2))--получение дистанции в метрах
								distext='('..distance..'м.)'
							end
							if rai.v then
														renderFontDrawText(font, "Нг ресурс"..distext, x1, y1, '0xFF'..hex)

							else
							renderFontDrawText(font, "Нг ресурс"..distext, x1, y1, colo14)
end
							if tres.v then 
							if rai.v then
							renderDrawLine(x10, y10, x1, y1, sizetr.v, '0xFF'..hex)
							else
								renderDrawLine(x10, y10, x1, y1, sizetr.v, colo14)
							end
							end
						end
					end
				end
				
				if nglavina.v then--если включен вх на оленей выполняется код ниже
					local model = getObjectModel(v)--получение айди объекта
					if (model == 816)  then--проверка на айди объекта. если совпадает с моделькой оленя - рендерим
						 
						local _, x, y, z = getObjectCoordinates(v)--получение координат объекта
						if isPointOnScreen(x, y, z) then--если олень на экране
							local x1, y1 = convert3DCoordsToScreen(x,y,z)--конвертация в векторные
							local x2,y2,z2 = getCharCoordinates(PLAYER_PED)--получение координат игрока
							local x10, y10 = convert3DCoordsToScreen(x2,y2,z2)--конвертация корд игрока
							if dis.v then
								local distance = string.format("%.1f", getDistanceBetweenCoords3d(x, y, z, x2, y2, z2))--получение дистанции в метрах
								distext='('..distance..'м.)'
							end
							if rai.v then
														renderFontDrawText(font, "Снег"..distext, x1, y1, '0xFF'..hex)

							else
							renderFontDrawText(font, "Снег"..distext, x1, y1, colo13)
end
							if tres.v then 
							if rai.v then
							renderDrawLine(x10, y10, x1, y1, sizetr.v, '0xFF'..hex)
							else
								renderDrawLine(x10, y10, x1, y1, sizetr.v, colo13)
							end
							end
						end
					end
				end
				
				
				if podarok.v then
					local model = getObjectModel(v)
					if (model == 2844)  then
						podarokk=podarokk+1
						local _, x, y, z = getObjectCoordinates(v)
						if isPointOnScreen(x, y, z) then
							local x1, y1 = convert3DCoordsToScreen(x,y,z)
							local x2,y2,z2 = getCharCoordinates(PLAYER_PED)
							local x10, y10 = convert3DCoordsToScreen(x2,y2,z2)
							if dis.v then
								local distance = string.format("%.1f", getDistanceBetweenCoords3d(x, y, z, x2, y2, z2))--получение дистанции в метрах
								distext='('..distance..'м.)'
							end			
if rai.v then

							
							renderFontDrawText(font, "Рванка"..distext, x1, y1, '0xFF'..hex)
							else
							renderFontDrawText(font, "Рванка"..distext, x1, y1, colo4)
							end
							if tres.v then

if rai.v then
							
								renderDrawLine(x10, y10, x1, y1, sizetr.v, '0xFF'..hex)
								else
								renderDrawLine(x10, y10, x1, y1, sizetr.v, colo4)
							end
							end
						end	
					end	
				end
				
				if klad.v then
					local model = getObjectModel(v)
					if model==16302 or model==2680 or model==1271 then
						local _, x, y, z = getObjectCoordinates(v)
						if isPointOnScreen(x, y, z) then
							rr = 0--обнуление числа объектов клада (замок, песок и сундук)
							local x1, y1 = convert3DCoordsToScreen(x,y,z)
							local x2,y2,z2 = getCharCoordinates(PLAYER_PED)
							local x10, y10 = convert3DCoordsToScreen(x2,y2,z2)
							local distance = string.format("%.1f", getDistanceBetweenCoords3d(x, y, z, x2, y2, z2))
							if model == 2680 then --Если есть песок/сундук/замок - счетчику частей клада прибавляется один. Клад считается цельным, если таких еденичек будет 3 (по 1 от каждого предмета)	
								if rai.v then
								
								
								renderFontDrawText(font, "Замок", x1, y1, '0xFF'..hex)
								else
								renderFontDrawText(font, "Замок", x1, y1, colo7)
								end
								if tres.v then 
								if rai.v then
								
								
									renderDrawLine(x10, y10, x1, y1, sizetr.v, '0xFF'..hex)
else								
								renderDrawLine(x10, y10, x1, y1, sizetr.v, colo7)
end	
	end
							end
							if  model == 16302 then 	
								
								--renderFontDrawText(font, "Песок", x1, y1-17, colo7)
							end
							if model == 1271 then 	
								if rai.v then
								
								renderFontDrawText(font, "Сундук", x1, y1, '0xFF'..hex)							
								else
								renderFontDrawText(font, "Сундук", x1, y1, colo7)								
							end
							end
							
							
								if model ~= 16302 then 	
									stt = 'Фейк'
									if tonumber(distance)<25 then--если дистанция меньше 25 метров (клады самим модом сервера отображаются на расстоянии 20 метров) - будет отображаться как настоящий клад
										if rai.v then
										renderFontDrawText(font, "Найден клад!("..distance..'м.) ', x1, y1-34, '0xFF'..hex)
else									
									renderFontDrawText(font, "Найден клад!("..distance..'м.) ', x1, y1-34, colo7) 
	
end	end
									
									if tonumber(distance)>25 then--если дистанция больше 25 метров - клад фейк, скрипт оповестит об этом
									if rai.v then
									
									
										renderFontDrawText(font, "Найден клад("..distance..'м. Слишком далеко прогружается, скорее всего фейк)', x1, y1-34,'0xFF'..hex)
else									
									renderFontDrawText(font, "Найден клад("..distance..'м. Слишком далеко прогружается, скорее всего фейк)', x1, y1-34, colo7)
	
end	end	
								end	
							
						end		
					end				
				end
			
				if gun.v then
					local model = getObjectModel(v)
					if model>345 and model<359 then
						gunk=gunk+1
						local _, x, y, z = getObjectCoordinates(v)
						if isPointOnScreen(x, y, z) then
							if dis.v then
								local distance = string.format("%.1f", getDistanceBetweenCoords3d(x, y, z, x2, y2, z2))--получение дистанции в метрах
								 
							end	
							local x1, y1 = convert3DCoordsToScreen(x,y,z)
							local x2,y2,z2 = getCharCoordinates(PLAYER_PED)
							local x10, y10 = convert3DCoordsToScreen(x2,y2,z2)
							if tres.v then 
							if rai.v then
							renderDrawLine(x10, y10, x1, y1, sizetr.v, '0xFF'..hex)
							else
								renderDrawLine(x10, y10, x1, y1, sizetr.v, colo8) 
							end
							end
							local distance = string.format("%.1f"..distext, getDistanceBetweenCoords3d(x, y, z, x2, y2, z2))	
							distext='('..distance..'м.)'
							if model == 346 then 								
								if rai.v then
									renderFontDrawText(font, "Кольт"..distext, x1, y1, '0xFF'..hex)
								else
									renderFontDrawText(font, "Кольт"..distext, x1, y1, colo8)
								end			
							end
							if model == 347 then 								
							if rai.v then
									renderFontDrawText(font, "Тайзер"..distext, x1, y1, '0xFF'..hex)
								else
									renderFontDrawText(font, "Тайзер"..distext, x1, y1, colo8)
								end		
							end
							if model == 348 then 								
								if rai.v then
									renderFontDrawText(font, "Дигл"..distext, x1, y1, '0xFF'..hex)
								else
									renderFontDrawText(font, "Дигл"..distext, x1, y1, colo8)
								end
							end
							if model == 349 then 								
								if rai.v then
									renderFontDrawText(font, "Дробаш"..distext, x1, y1, '0xFF'..hex)
								else
									renderFontDrawText(font, "Дробаш"..distext, x1, y1, colo8)
								end	
							end
							if model == 350 then 								
								if rai.v then
									renderFontDrawText(font, "Обрез"..distext, x1, y1, '0xFF'..hex)
								else
									renderFontDrawText(font, "Обрез"..distext, x1, y1, colo8)
								end
							end
							if model == 351 then 								
								if rai.v then
									renderFontDrawText(font, "Винчестер"..distext, x1, y1, '0xFF'..hex)
								else
									renderFontDrawText(font, "Винчестер"..distext, x1, y1, colo8)
								end
							end
							if model == 352 then 								
								if rai.v then
									renderFontDrawText(font, "Узи"..distext, x1, y1, '0xFF'..hex)
								else
									renderFontDrawText(font, "Узи"..distext, x1, y1, colo8)
								end
							end
							if model == 353 then 								
								if rai.v then
									renderFontDrawText(font, "Мп5"..distext, x1, y1, '0xFF'..hex)
								else
									renderFontDrawText(font, "Мп5"..distext, x1, y1, colo8)
								end		
							end
							if model == 355 then 								
								if rai.v then
									renderFontDrawText(font, "Ака-47"..distext, x1, y1, '0xFF'..hex)
								else
									renderFontDrawText(font, "Ака-47"..distext, x1, y1, colo8)
								end
							end
							if model == 356 then 								
								if rai.v then
									renderFontDrawText(font, "М4"..distext, x1, y1, '0xFF'..hex)
								else
									renderFontDrawText(font, "М4"..distext, x1, y1, colo8)
								end
							end
							if model == 357 then 								
								if rai.v then
									renderFontDrawText(font, "Рифла"..distext, x1, y1, '0xFF'..hex)
								else
									renderFontDrawText(font, "Рифл"..distext, x1, y1, colo8)
								end
							end
							if model == 358 then 								
								if rai.v then
									renderFontDrawText(font, "Снайперка"..distext, x1, y1, '0xFF'..hex)
								else
									renderFontDrawText(font, "Снайперка"..distext, x1, y1, colo8)
								end
							end
						end
					end
				end
				
				if semena.v then
					local model = getObjectModel(v)
					if model == 859 then 
						local _, x, y, z = getObjectCoordinates(v)
						if isPointOnScreen(x, y, z) then
							local x1, y1 = convert3DCoordsToScreen(x,y,z)	
							local x2,y2,z2 = getCharCoordinates(PLAYER_PED)
							local x10, y10 = convert3DCoordsToScreen(x2,y2,z2)
							if dis.v then
								local distance = string.format("%.1f", getDistanceBetweenCoords3d(x, y, z, x2, y2, z2))--получение дистанции в метрах
								distext='('..distance..'м.)'
							end				
if rai.v then
renderFontDrawText(font, "Семена"..distext, x1, y1, '0xFF'..hex)
else							
							renderFontDrawText(font, "Семена"..distext, x1, y1, colo9)
							end
							if tres.v then 
							if rai.v then
							renderDrawLine(x10, y10, x1, y1, sizetr.v, '0xFF'..hex)
							else
								renderDrawLine(x10, y10, x1, y1, sizetr.v, colo9)end end
							end
							semenak=semenak+1
						end
					end
				end
				
				
				
					
				
				if graffiti.v or narko.v or lenn.v or hlopok.v or ryda.v or nglavina.v then --объеденено, т.к. поиск идет не по моделькам, а по 3д тексту
					graffitik=0--обнуления количества граффити
					if ryda.v or gvagos.v or ggrove.v or gwolf.v or gballas.v or gaztecas.v or grifa.v or narko.v or nglavina.v then--проверка на включенность граффити или нарко. Если все офнуто - код ниже не будет воркать
						for id = 0, 2048 do
							if sampIs3dTextDefined(id) then
								local text, color, posX, posY, posZ, distance, ignoreWalls, player, vehicle = sampGet3dTextInfoById(id)--инфа о 3д тексте
								if isPointOnScreen(posX, posY, posZ, 3.0) then
								
								----------------------------------
								----------------------------------
								----------------------------------
								----------------------------------
								----------------------------------
								
								
						if text:match ('Месторождение ресурсов') then--поиск текста нарк
										p1, p2 = convert3DCoordsToScreen(posX, posY, posZ)--конвертации корд
										p3, p4 = convert3DCoordsToScreen(px, py, pz)
										if dis.v then
											px, py, pz = getCharCoordinates(PLAYER_PED)
											local distance = string.format("%.1f", getDistanceBetweenCoords3d(px, py, pz, posX, posY, posZ))
											textb='Руда('..distance..'м)'
										else
											textb='Руда'
										end
										if rai.v then
										renderFontDrawText(font, textb, p1, p2, '0xFF'..hex)
										else
										renderFontDrawText(font, textb, p1, p2, -1)--рендерим текст
										end
										local x2,y2,z2 = getCharCoordinates(PLAYER_PED)
										local x10, y10 = convert3DCoordsToScreen(x2,y2,z2)
										 if tres.v then
											if rai.v then
											renderDrawLine(x10, y10, p1, p2, sizetr.v, '0xFF'..hex)
											else
											renderDrawLine(x10, y10, p1, p2, sizetr.v, -1)--рендерим трейсер
											end
										end
										rydak=rydak+1--плюсик в статистику
									end
								
								if hlopok.v then
								if text:match('Хлопок%((%d+) из (%d+)%)') then
									n1,n2=text:match('Хлопок%((%d+) из (%d+)%)') 
									local wposX, wposY = convert3DCoordsToScreen(posX,posY,posZ)
									local resX, resY = getScreenResolution()
									if wposX < resX and wposY < resY then
						if isPointOnScreen (posX,posY,posZ,1) then
						 x2,y2,z2 = getCharCoordinates(PLAYER_PED)
			 x10, y10 = convert3DCoordsToScreen(x2,y2,z2)
			 if dis.v then
											px, py, pz = getCharCoordinates(PLAYER_PED)
											local distance = string.format("%.1f", getDistanceBetweenCoords3d(px, py, pz, posX, posY, posZ))
											textb='('..distance..'м)'
										else
											textb=''
										end
						if rai.v then
						renderFontDrawText(font, "Хлопок("..n1..'из'..n2..')'..textb, wposX, wposY, '0xFF'..hex)
						else
										 renderFontDrawText(font, "Хлопок("..n1..'из'..n2..') '..textb, wposX, wposY, 0xFFD00000)
										 end
										if tres.v then 
										if rai.v then
										renderDrawLine(x10, y10, wposX, wposY, 3.0,  '0xFF'..hex)
										else
										renderDrawLine(x10, y10, wposX, wposY, 3.0,  0xFFD00000) end
						end				
						end

						
						end
					end
					
					if text:match('Хлопок в процессе роста\n{FFFFFF}Осталось (%d+):(%d+)') then
					t1,t2=text:match('Хлопок в процессе роста\n{FFFFFF}Осталось (%d+):(%d+)')
--sampAddChatMessage(t1..':'..t2,-1)
local wposX, wposY = convert3DCoordsToScreen(posX,posY,posZ)
						local resX, resY = getScreenResolution()
						if wposX < resX and wposY < resY then
						if isPointOnScreen (posX,posY,posZ,1) then
						 x2,y2,z2 = getCharCoordinates(PLAYER_PED)
			 x10, y10 = convert3DCoordsToScreen(x2,y2,z2)
			 if dis.v then
											px, py, pz = getCharCoordinates(PLAYER_PED)
											local distance = string.format("%.1f", getDistanceBetweenCoords3d(px, py, pz, posX, posY, posZ))
											textb='('..distance..'м)'
										else
											textb=''
										end
			 if rai.v then
			  renderFontDrawText(font, "Хлопок("..t1..':'..t2..") "..textb, wposX, wposY, '0xFF'..hex) 
			  if tres.v then renderDrawLine(x10, y10, wposX, wposY, 3.0, '0xFF'..hex) end
			 else
										  renderFontDrawText(font, "Хлопок("..t1..':'..t2..") "..textb, wposX, wposY, 0xFBCEB1AA) 
										  if tres.v then renderDrawLine(x10, y10, wposX, wposY, 3.0, 0xFBCEB1AA)end
										  end
										
						end				

						end
end
end
if lenn.v then
if text:match('Лён%((%d+) из (%d+)%)') then
						n1,n2=text:match('Лён%((%d+) из (%d+)%)') 
						local wposX, wposY = convert3DCoordsToScreen(posX,posY,posZ)
						local resX, resY = getScreenResolution()
						if wposX < resX and wposY < resY then
						if isPointOnScreen (posX,posY,posZ,1) then
						 x2,y2,z2 = getCharCoordinates(PLAYER_PED)
			 x10, y10 = convert3DCoordsToScreen(x2,y2,z2)
			 if dis.v then
											px, py, pz = getCharCoordinates(PLAYER_PED)
											local distance = string.format("%.1f", getDistanceBetweenCoords3d(px, py, pz, posX, posY, posZ))
											textb='('..distance..'м)'
										else
											textb=''
										end
			 if rai.v then
			 renderFontDrawText(font, "Лён("..n1..'из'..n2..') '..textb, wposX, wposY, '0xFF'..hex) 
			 if tres.v then renderDrawLine(x10, y10, wposX, wposY, 3.0,  '0xFF'..hex)  end
			 else
	renderFontDrawText(font, "Лён("..n1..'из'..n2..') '..textb, wposX, wposY, 0xFFD00000)
	if tres.v then renderDrawLine(x10, y10, wposX, wposY, 3.0,  0xFFD00000) end
end	
										
						end				

						end
					end

if text:match('Лён в процессе роста\n{FFFFFF}Осталось (%d+):(%d+)') then
					t1,t2=text:match('Лён в процессе роста\n{FFFFFF}Осталось (%d+):(%d+)')
--sampAddChatMessage(t1..':'..t2,-1)
local wposX, wposY = convert3DCoordsToScreen(posX,posY,posZ)
						local resX, resY = getScreenResolution()
						if wposX < resX and wposY < resY then
						if isPointOnScreen (posX,posY,posZ,1) then
						 x2,y2,z2 = getCharCoordinates(PLAYER_PED)
			 x10, y10 = convert3DCoordsToScreen(x2,y2,z2)
			 if dis.v then
											px, py, pz = getCharCoordinates(PLAYER_PED)
											local distance = string.format("%.1f", getDistanceBetweenCoords3d(px, py, pz, posX, posY, posZ))
											textb='('..distance..'м)'
										else
											textb=''
										end
			 if rai.v then
			 renderFontDrawText(font, "Лён("..t1..':'..t2..") "..textb, wposX, wposY, '0xFF'..hex) 
			 if tres.v then renderDrawLine(x10, y10, wposX, wposY, 3.0, '0xFF'..hex)end
			 else
										 renderFontDrawText(font, "Лён("..t1..':'..t2..")  "..textb, wposX, wposY, 0xFBCEB1AA) 
										 if tres.v then renderDrawLine(x10, y10, wposX, wposY, 3.0, 0xFBCEB1AA)end
end										 
										
						end				

						end
end
end
---------------------
---------------------
---------------------
---------------------
---------------------

								
								
									if text:match ('Используйте %{CFF277%}ALT%{FFFFFF%} чтобы подобрать') and narko.v then--поиск текста нарк
										p1, p2 = convert3DCoordsToScreen(posX, posY, posZ)--конвертации корд
										p3, p4 = convert3DCoordsToScreen(px, py, pz)
										if dis.v then
											px, py, pz = getCharCoordinates(PLAYER_PED)
											local distance = string.format("%.1f", getDistanceBetweenCoords3d(px, py, pz, posX, posY, posZ))
											textb='Закладка('..distance..'м)'
										else
											textb='Закладка'
										end
										if rai.v then
										renderFontDrawText(font, textb, p1, p2, '0xFF'..hex)
										else
										renderFontDrawText(font, textb, p1, p2, colo3)--рендерим текст
										end
										local x2,y2,z2 = getCharCoordinates(PLAYER_PED)
										local x10, y10 = convert3DCoordsToScreen(x2,y2,z2)
										if tres.v then
											if rai.v then
											renderDrawLine(x10, y10, p1, p2, sizetr.v, '0xFF'..hex) 
											else
											renderDrawLine(x10, y10, p1, p2, sizetr.v, colo3)--рендерим трейсер
											end
										end
										narkok=narkok+1--плюсик в статистику
									end 
						
									if graffiti.v and text:find('Можно закрасить') then
										
										if text:match ('Можно закрасить через %{......%}(.*)%{D5DF49%} часов!') then--поиск текста на закраску граффити через время
											ch = text:match ('Можно закрасить через %{......%}(.*)%{D5DF49%} часов!')--получаем часы до закраски
										end
										px, py, pz = getCharCoordinates(PLAYER_PED)
											local distance = string.format("%.1f", getDistanceBetweenCoords3d(px, py, pz, posX, posY, posZ))
											
											if dis.v then textb = '('..distance..'м)' 
											else
											textb=''
											end
										if text:find('Grove Street') and text:find('Можно закрасить') and ggrove.v then--поиск граффити грув
											p1, p2 = convert3DCoordsToScreen(posX, posY, posZ)
											p3, p4 = convert3DCoordsToScreen(px, py, pz)
											
											if text:find('часов') then --узнаем, можно ли уже закрасить, или еще нет
												text = string.format("{B0E0E6}[Graffiti] ".."{228B22}Grove Street | можно закрасить через {B0E0E6}"..ch..'{228B22} часов'..textb)
											else
												text = string.format("{B0E0E6}[Graffiti] ".."{228B22}Grove Street {FFFAFA}[+]"..textb)
											end
											if rai.v then
											renderFontDrawText(font, text, p1, p2, '0xFF'..hex) 
											else
											renderFontDrawText(font, text, p1, p2, 0xcac1f4c1)--создаем текст
											end
											local x2,y2,z2 = getCharCoordinates(PLAYER_PED)
											local x10, y10 = convert3DCoordsToScreen(x2,y2,z2)
											if tres.v then--трейсер
											if rai.v then
											renderDrawLine(x10, y10, p1, p2, sizetr.v, '0xFF'..hex) 
											else
												renderDrawLine(x10, y10, p1, p2, sizetr.v, -1)
											end
											end
											graffitik=graffitik+1--+1 к стате граффити
										end
										
										if text:find('The Rifa') and text:find('Можно закрасить') and grifa.v then
											p1, p2 = convert3DCoordsToScreen(posX, posY, posZ)
											p3, p4 = convert3DCoordsToScreen(px, py, pz)
																				
  
											if text:find('часов') then 
												
												text = string.format("{B0E0E6}[Graffiti] ".."{4682B4}The Rifa | можно закрасить через {B0E0E6}"..ch..'{4682B4} часов'..textb)
											else
												text = string.format("{B0E0E6}[Graffiti] ".."{4682B4}The Rifa {FFFAFA}[+]"..textb)
											end
											if rai.v then
											renderFontDrawText(font, text, p1, p2, '0xFF'..hex) 
											else
											renderFontDrawText(font, text, p1, p2, 0xcac1f4c1)
											end
											local x2,y2,z2 = getCharCoordinates(PLAYER_PED)
											local x10, y10 = convert3DCoordsToScreen(x2,y2,z2)
											if tres.v then
											if rai.v then
											renderDrawLine(x10, y10, p1, p2, sizetr.v, '0xFF'..hex) 
											else
											renderDrawLine(x10, y10, p1, p2, sizetr.v, colo3)--рендерим трейсер
											end
										end
											graffitik=graffitik+1
										end
										
										if text:find('East Side Ballas') and text:find('Можно закрасить') and gballas.v then
											p1, p2 = convert3DCoordsToScreen(posX, posY, posZ)
											p3, p4 = convert3DCoordsToScreen(px, py, pz)
											  distance = string.format("%.1f", getDistanceBetweenCoords3d(x2,y2,z2, posX, posY, posZ)) 
											if text:find('часов') then 
												text = string.format("{B0E0E6}[Graffiti] ".."{EE82EE}Ballas | можно закрасить через {B0E0E6}"..ch..'{EE82EE} часов'..textb)
											else
												text = string.format("{B0E0E6}[Graffiti] ".."{EE82EE}Ballas {FFFAFA}[+]"..textb)
											end
											if rai.v then
											renderFontDrawText(font, text, p1, p2, '0xFF'..hex) 
											else
											renderFontDrawText(font, text, p1, p2, 0xcac1f4c1)
											end
											local x2,y2,z2 = getCharCoordinates(PLAYER_PED)
											local x10, y10 = convert3DCoordsToScreen(x2,y2,z2)
											if tres.v then
											if rai.v then
											renderDrawLine(x10, y10, p1, p2, sizetr.v, '0xFF'..hex) 
											else
											renderDrawLine(x10, y10, p1, p2, sizetr.v, colo3)--рендерим трейсер
											end
										end
											graffitik=graffitik+1
										end
										
										if text:find('Varrios Los Aztecas') and text:find('Можно закрасить') and gaztecas.v then
											p1, p2 = convert3DCoordsToScreen(posX, posY, posZ)
											p3, p4 = convert3DCoordsToScreen(px, py, pz)
											if text:find('часов') then 
												text = string.format("{B0E0E6}[Graffiti] ".."{00BFFF}Los-Aztecas | можно закрасить через {B0E0E6}"..ch..'{00BFFF} часов'..textb)
											else
												text = string.format("{B0E0E6}[Graffiti] ".."{00BFFF}Los-Aztecas {FFFAFA}[+]"..textb)
											end
											if rai.v then
											renderFontDrawText(font, text, p1, p2, '0xFF'..hex) 
											else
											renderFontDrawText(font, text, p1, p2, 0xcac1f4c1)
											end
											local x2,y2,z2 = getCharCoordinates(PLAYER_PED)
											local x10, y10 = convert3DCoordsToScreen(x2,y2,z2)
											if tres.v then
											if rai.v then
											renderDrawLine(x10, y10, p1, p2, sizetr.v, '0xFF'..hex) 
											else
											renderDrawLine(x10, y10, p1, p2, sizetr.v, colo3)--рендерим трейсер
											end
										end
											graffitik=graffitik+1
										end
										
										if text:find('Night Wolves') and text:find('Можно закрасить') and gwolf.v then
											p1, p2 = convert3DCoordsToScreen(posX, posY, posZ)
											p3, p4 = convert3DCoordsToScreen(px, py, pz)
											if text:find('часов') then 
												text = string.format("{B0E0E6}[Graffiti] ".."{DCDCDC}Night Wolves | можно закрасить через {B0E0E6}"..ch..'{DCDCDC} часов'..textb)
											else
												text = string.format("{B0E0E6}[Graffiti] ".."{DCDCDC}Night Wolves {FFFAFA}[+]"..textb)
											end
											if rai.v then
											renderFontDrawText(font, text, p1, p2, '0xFF'..hex) 
											else
											renderFontDrawText(font, text, p1, p2, 0xcac1f4c1)
											end
											local x2,y2,z2 = getCharCoordinates(PLAYER_PED)
											local x10, y10 = convert3DCoordsToScreen(x2,y2,z2)
											if tres.v then
											if rai.v then
											renderDrawLine(x10, y10, p1, p2, sizetr.v, '0xFF'..hex) 
											else
											renderDrawLine(x10, y10, p1, p2, sizetr.v, colo3)--рендерим трейсер
											end
										end
											graffitik=graffitik+1
										end
										
										if text:find('Los Santos Vagos') and text:find('Можно закрасить') and gvagos.v then
										 
											p1, p2 = convert3DCoordsToScreen(posX, posY, posZ)
											p3, p4 = convert3DCoordsToScreen(px, py, pz)
											if text:find('часов') then 
												text = string.format("{B0E0E6}[Graffiti] ".."{FFD700}Vagos | можно закрасить через {B0E0E6}"..ch..'{FFD700} часов'..textb)
											else
												text = string.format("{B0E0E6}[Graffiti] ".."{FFD700}Vagos {FFFAFA}[+]"..textb)
											end
											if rai.v then
											renderFontDrawText(font, text, p1, p2, '0xFF'..hex) 
											else
											renderFontDrawText(font, text, p1, p2, 0xcac1f4c1)
											end
											local x2,y2,z2 = getCharCoordinates(PLAYER_PED)
											local x10, y10 = convert3DCoordsToScreen(x2,y2,z2)
											if tres.v then
											if rai.v then
											renderDrawLine(x10, y10, p1, p2, sizetr.v, '0xFF'..hex) 
											else
											renderDrawLine(x10, y10, p1, p2, sizetr.v, colo3)--рендерим трейсер
											end
										end
											graffitik=graffitik+1
										end
									end
								end
							end
						end
					end
				end
				
				if ryda.v then
				for k, v in pairs(resources) do
					local object = sampGetObjectHandleBySampId(k)
						local bool, ox, oy, oz = getObjectCoordinates(object)
						if isPointOnScreen(ox, oy, oz,0.3) then
						local x1, y1 = convert3DCoordsToScreen(ox, oy, oz)
						local mx, my, mz = getCharCoordinates(1)
						local x2, y2 = convert3DCoordsToScreen(mx, my, mz)
						local distance = string.format("%.1f", getDistanceBetweenCoords3d(ox, oy, oz, mx, my, mz))
						  
						  if rai.v then
						  renderFontDrawText(font, resNames[v][1]..'\nДистанция: '..distance, x1, y1, '0xFF'..hex) 
						  else
							renderFontDrawText(font, resNames[v][1]..'\nДистанция: '..distance, x1, y1, -1) 
						 end
					end
				end
			end
			
			
			
			end
		end
	end
--проебался на 1 отступ сука, я ебал чистить код 
function onScriptTerminate(script, quitGame)
	if script == thisScript() then
		sampShowDialog(1338, 'Arizona Render by Stenford','Привет, братан, это Стенфорд. ARZR крашнулося. Почему? Сейчас мы это с тобой выясним.Для поиска причины краша - тебе \n нужно открыть лог мунлоадера(в папке moonloader есть файл moonloader.log).Открой этот файл и попробуй самостоятельно \nнайти ошибку (пользуйся переводчиком, гуглом и темой blast.hk). Если найдешь, что у тебя нет какого-то файла - скачай его в \nсвою сборку. Специально для этого, в теме моего скрипта есть "Спойлер: зависимости(библиотеки)". Там ты сможешь найти \nабсолютно все файлы для работы скрипта: кликабельное название файла - путь установки. Если и это не принесло успехов \n- посмотри сообщения в теме, возможно я уже помог кому-то решить аналошичгую проблему. И только если ничего из этого \nничегое помогло - пиши уже мне, в теме скрипта, либо в моей телеграмм. Сразу скинув лог мунлоадера.\n\nТема скрипта: https://www.blast.hk/threads/101307\nМой телеграмм: t.me/Stenford','закрыть')
	end

end
function cmd_work()--включение/выключение окна
	main_window_state.v = not main_window_state.v
end

local fa_font = nil--обнуление шрифтов имгуи
local fontsize20 = nil
local fontsize15 = nil

local fa_glyph_ranges = imgui.ImGlyphRanges({ fa.min_range, fa.max_range })
local glyph_ranges_cyrillic = imgui.GetIO().Fonts:GetGlyphRangesCyrillic()
function imgui.BeforeDrawFrame()--дальше идет создания разных шрифтов имгуи
	if fa_font == nil then
		local font_config = imgui.ImFontConfig()
		font_config.MergeMode = true
			
			  if doesFileExist(getWorkingDirectory() .. '\\lib\\fa-solid-900.ttf')  then
		fa_font = imgui.GetIO().Fonts:AddFontFromFileTTF('moonloader\\lib\\fa-solid-900.ttf', 13.0, font_config, fa_glyph_ranges)
		 end
	end
	if fontsize20 == nil then
		fontsize20 = imgui.GetIO().Fonts:AddFontFromFileTTF(getFolderPath(0x14) .. '\\trebucbd.ttf', 35.0, nil, glyph_ranges_cyrillic)
	end
	
end
function imgui.CenterText(text)
    local width = imgui.GetWindowWidth()
    local calc = imgui.CalcTextSize(text)
    imgui.SetCursorPosX( width / 2 - calc.x / 2 )
    imgui.Text(text)
end
function explode_argb(argb)--соединение цвета
    local a = bit.band(bit.rshift(argb, 24), 0xFF)
    local r = bit.band(bit.rshift(argb, 16), 0xFF)
    local g = bit.band(bit.rshift(argb, 8), 0xFF)
    local b = bit.band(argb, 0xFF)
    return a, r, g, b
end



function imgui.OnDrawFrame()--имгуи
	local sw, sh = getScreenResolution()--получаем размеры  окна
    imgui.SetNextWindowPos(imgui.ImVec2(sw / 2, sh / 2), imgui.Cond.FirstUseEver, imgui.ImVec2(0.5, 0.5))--выравниваем по центру экрана	
	imgui.SetNextWindowSize(imgui.ImVec2(shirina, visota), 1)--ставим ширину и высоту
	
	if not doesFileExist(getWorkingDirectory() .. '/config/photoforngstyle.jpg') or not doesFileExist(getWorkingDirectory() .. '/config/photoforautumnstyle.jpeg')or not doesFileExist(getWorkingDirectory() .. '/config/photoforwinterstyle.jpg')or not doesFileExist(getWorkingDirectory() .. '/config/photoforsprstyle.jpg')or not doesFileExist(getWorkingDirectory() .. '/config/photoforsummerstyle.jpg')or not doesFileExist(getWorkingDirectory() .. '/config/photoforfev14style.jpg')or not doesFileExist(getWorkingDirectory() .. '/config/photoforuastyle.jpg')or not doesFileExist(getWorkingDirectory() .. '/config/photoformart8style.jpg') or not doesFileExist(getWorkingDirectory() .. '/config/photoforfev23style.jpg') or not doesFileExist(getWorkingDirectory() .. '/config/photofordrstyle.jpg')  then  	 --sampAddChatMessage("["..nazvanie.v.."]{FFFFFF} {FF0000}Ошибка!{FFFFFF} У вас отсутствуют нужные картинки для работы скрипта, начинаю скачивание.", 0x046D63)
		downloadUrlToFile('http://stenford.fun/photoforngstyle.jpg', getWorkingDirectory() .. '/config/photoforngstyle.jpg')
		downloadUrlToFile('http://stenford.fun/photofordrstyle.jpg', getWorkingDirectory() .. '/config/photofordrstyle.jpg') 
		downloadUrlToFile('http://stenford.fun/photoforfev14style.jpg', getWorkingDirectory() .. '/config/photoforfev14style.jpg') 
		downloadUrlToFile('http://stenford.fun/photoforfev23style.jpg', getWorkingDirectory() .. '/config/photoforfev23style.jpg') 
		downloadUrlToFile('http://stenford.fun/photoformart8style.jpg', getWorkingDirectory() .. '/config/photoformart8style.jpg') 
		downloadUrlToFile('http://stenford.fun/photoforuastyle.jpg', getWorkingDirectory() .. '/config/photoforuastyle.jpg') 
		
		downloadUrlToFile('http://stenford.fun/photoforsummerstyle.jpg', getWorkingDirectory() .. '/config/photoforsummerstyle.jpg') 
		downloadUrlToFile('http://stenford.fun/photoforsprstyle.jpg', getWorkingDirectory() .. '/config/photoforsprstyle.jpg') 
		downloadUrlToFile('http://stenford.fun/photoforwinterstyle.jpg', getWorkingDirectory() .. '/config/photoforwinterstyle.jpg') 
		downloadUrlToFile('http://stenford.fun/photoforautumnstyle.jpeg', getWorkingDirectory() .. '/config/photoforautumnstyle.jpeg') 
		
	end
	
	if main_window_state.v then
		imgui.Begin(text, main_window_state, imgui.WindowFlags.NoResize, imgui.WindowFlags.NoCollapse, imgui.WindowFlags.NoSavedSettings)--заголовок с разными флагами
		
		
			
			imgui.ShowCursor = true--включение курсора
			if menu==0 then--если открыто меню
				menu0()
			end
			if menu == 6666 then--вкладка с инфой
			menupiar6666()
			if ng then
				imgui.SetCursorPosY(20)
				imgui.SetCursorPosX(0)
				imgui.Image(image, imgui.ImVec2(365, 210), imgui.ImVec2(0,0), imgui.ImVec2(1,1), imgui.ImVec4(1, 1, 1, 0.3))
			end
			if spr then
				imgui.SetCursorPosY(20)
				imgui.SetCursorPosX(0)
				imgui.Image(imagespr, imgui.ImVec2(365, 210), imgui.ImVec2(0,0), imgui.ImVec2(1,1), imgui.ImVec4(1, 1, 1, 0.3))
			end
			if summer then
				imgui.SetCursorPosY(20)
				imgui.SetCursorPosX(0)
				imgui.Image(imagesummer, imgui.ImVec2(365, 210), imgui.ImVec2(0,0), imgui.ImVec2(1,1), imgui.ImVec4(1, 1, 1, 0.3))
			end
			if autumn then
				imgui.SetCursorPosY(20)
				imgui.SetCursorPosX(0)
				imgui.Image(imageautumn, imgui.ImVec2(365, 210), imgui.ImVec2(0,0), imgui.ImVec2(1,1), imgui.ImVec4(1, 1, 1, 0.3))
			end
			if winter then
				imgui.SetCursorPosY(20)
				imgui.SetCursorPosX(0)
				imgui.Image(imagewinter, imgui.ImVec2(365, 210), imgui.ImVec2(0,0), imgui.ImVec2(1,1), imgui.ImVec4(1, 1, 1, 0.3))
			end
			if ua then
				imgui.SetCursorPosY(20)
				imgui.SetCursorPosX(0)
				imgui.Image(imageua, imgui.ImVec2(365, 210), imgui.ImVec2(0,0), imgui.ImVec2(1,1), imgui.ImVec4(1, 1, 1, 0.3))
			end
			if mart8 then
				imgui.SetCursorPosY(20)
				imgui.SetCursorPosX(0)
				imgui.Image(imagemart8, imgui.ImVec2(365, 210), imgui.ImVec2(0,0), imgui.ImVec2(1,1), imgui.ImVec4(1, 1, 1, 0.3))
			end
			if fev23 then
				imgui.SetCursorPosY(20)
				imgui.SetCursorPosX(0)
				imgui.Image(imagefev23, imgui.ImVec2(365, 210), imgui.ImVec2(0,0), imgui.ImVec2(1,1), imgui.ImVec4(1, 1, 1, 0.3))
			end
			if fev14 then
				imgui.SetCursorPosY(20)
				imgui.SetCursorPosX(0)
				imgui.Image(imagefev14, imgui.ImVec2(365, 210), imgui.ImVec2(0,0), imgui.ImVec2(1,1), imgui.ImVec4(1, 1, 1, 0.3))
			end
			if dr then
				imgui.SetCursorPosY(20)
				imgui.SetCursorPosX(0)
				imgui.Image(imagedr, imgui.ImVec2(365, 210), imgui.ImVec2(0,0), imgui.ImVec2(1,1), imgui.ImVec4(1, 1, 1, 0.3))
			end
				imgui.PushFont(fontsize20) 
				imgui.SetCursorPosX((imgui.GetWindowWidth() - 270)/2)
				imgui.SetCursorPosY(26)
				if imgui.Button(u8'Telegram') then
					sampAddChatMessage('123',-1)
					os.execute('start https://t.me/Stenford')--открытие телеги
				end
				imgui.SameLine()
				if imgui.Button(u8'Blast.Hk') then
					sampAddChatMessage('123',-1)
					os.execute('start https://www.blast.hk/threads/101307/')--открытие темы бх
				end
				
				local text = 'Для меценатов:'
				imgui.SetCursorPosX((imgui.GetWindowWidth() - imgui.CalcTextSize(u8(text)).x)/2)
				imgui.Text(u8(text))
				local text = '4441-1144-2590-8314'
				imgui.SetCursorPosX((imgui.GetWindowWidth() - imgui.CalcTextSize(u8(text)).x)/2)
				imgui.Text(u8(text))
				local text = 'Denys Hradov'
				imgui.SetCursorPosX((imgui.GetWindowWidth() - imgui.CalcTextSize(u8(text)).x)/2)
				imgui.Text(u8(text))
				

				if imgui.Button(u8"В меню") then
					shirina=365
					visota=215
					menu = 0
				end
				imgui.SameLine()
				if imgui.Button(u8'Благодарности')then
				 menu = 18
				end
				imgui.SetCursorPosY(1)
				
				
				imgui.PopFont()
			end
			if menu ==3 then--скрытые настройки, которые когда-то были отдельной вкладкой (аля пасхалка)
			
			
				if imgui.Checkbox(u8'Ники', nicks) then
					mainini.settings.nicks=nicks.v
					inicfg.save(mainini,directini)
				end
				if imgui.Checkbox(u8'Cкелеты', skelet) then
					mainini.settings.skelet=skelet.v
					inicfg.save(mainini,directini)	
				end
			end
			if  menu==18 then
			imgui.SetCursorPosX((imgui.GetWindowWidth() - 202)/2)
			if imgui.Button(u8"В меню") then
					shirina=365
					visota=215
					menu = 0
				end
				imgui.SameLine()
			if imgui.Button(u8"Информация о скрипте") then
				visota=233
				 menu = 6666
				end
			imgui.Text(u8'Страница с благодарностями всем тем, кто помог в раз-\nработке скрипта. Попасть сюда может любой человек!')
			imgui.Text( '')
			imgui.CenterTextColoredRGB( 'Пожертвования:')
			imgui.CenterTextColoredRGB( '{FFD000}Хто я {FFFFFF}- 500 рублей')--{FFD000}{FFFFFF}
			imgui.CenterTextColoredRGB( '{FFD000}FantomKiller .cs{FFFFFF} - 194,52 рубля')
			imgui.CenterTextColoredRGB( '{FFD000}Парень с урала{FFFFFF} - 150 рублей')
			imgui.Text( ' ') 
			imgui.CenterTextColoredRGB( 'Помощники в написании кода скрипта:')
			imgui.CenterTextColoredRGB( '{FFD000}Chapo{FFFFFF} - постоянная помощь в разных моментах')
			imgui.CenterTextColoredRGB( '{FFD000}fvkbvck{FFFFFF} - помогает отвечать в теме скрипта')
			imgui.CenterTextColoredRGB( '{FFD000}paulohardy{FFFFFF} - написал РВХ')
			imgui.CenterTextColoredRGB( '{FFD000}pakulichev{FFFFFF} - написал функцию создания и удаления объекта')
			imgui.CenterTextColoredRGB( '{FFD000}Lolendor{FFFFFF} - помог сделать нормальное сохранение')
			imgui.CenterTextColoredRGB( '{FFD000}applethecandy{FFFFFF} - написал ВХ на ники/скелеты')
			imgui.CenterTextColoredRGB( '{FFD000}Rice.{FFFFFF} - помог с багом на отображение курсора')
			imgui.CenterTextColoredRGB( '{FFD000}William_Roses{FFFFFF} - помог с хоткеями')
			imgui.CenterTextColoredRGB( '{FFD000}T1cKz{FFFFFF} - помог с отображением картинки')
			imgui.CenterTextColoredRGB( '{FFD000}MrCreepTon{FFFFFF} - создал имгуи тему')
			imgui.CenterTextColoredRGB( '{FFD000}checkdasound{FFFFFF} - создал имгуи тему')
			imgui.CenterTextColoredRGB( '{FFD000}madrasso{FFFFFF} - создал имгуи тему')
			imgui.CenterTextColoredRGB( '{FFD000}Joni Scripts{FFFFFF} - создал имгуи тему')
			imgui.CenterTextColoredRGB( '{FFD000}D.Kopnev{FFFFFF} - создал имгуи тему')
			imgui.CenterTextColoredRGB( '{FFD000}Albertio{FFFFFF} - создал имгуи тему')
			imgui.CenterTextColoredRGB( '{FFD000}whyrinki{FFFFFF} - создал имгуи тему')
			imgui.CenterTextColoredRGB( '{FFD000}blackw1ndow{FFFFFF} - создал имгуи тему')
			imgui.CenterTextColoredRGB( '{FFD000}ADscripts{FFFFFF} - создал имгуи тему')
			imgui.CenterTextColoredRGB( '{FFD000}richardskiy{FFFFFF} - создал имгуи тему')
			imgui.CenterTextColoredRGB( '{FFD000}CaJlaT{FFFFFF} - создал имгуи тему')
			imgui.CenterTextColoredRGB( '{FFD000}Sanchez.{FFFFFF} - создал имгуи тему')
			imgui.CenterTextColoredRGB( '{FFD000}Kaban Bunya{FFFFFF} - реализовал подгрузку фото')
			imgui.Text( ' ') 
			imgui.CenterTextColoredRGB( 'Предложили хорошую идею для обновления')
			imgui.CenterTextColoredRGB( '{FFD000}Lcfr_Dprsd{FFFFFF} - нашел баг с трейсером')
			imgui.CenterTextColoredRGB( '{FFD000}Dark.{FFFFFF} - предложить адаптировать под R3')
			imgui.CenterTextColoredRGB( '{FFD000}ARMOR{FFFFFF} - предложил добавить спойлер с Update List')
			imgui.CenterTextColoredRGB( '{FFD000}FUNTIK777{FFFFFF} - нашел баг с просадкой FPS')
			imgui.CenterTextColoredRGB( '{FFD000}Hvozdytskyy{FFFFFF} - нашел баг с граффити')
			imgui.CenterTextColoredRGB( '{FFD000}Tol4ek{FFFFFF} - предложил переделать вх на закладки')
			imgui.CenterTextColoredRGB( '{FFD000}FUNTIK777{FFFFFF} - предложил добавить "фейк/не фейк" клад')
			imgui.CenterTextColoredRGB( '{FFD000}RuDoge{FFFFFF} - нашел баг с крашем на шахте')
			imgui.CenterTextColoredRGB( '{FFD000}zyo3331{FFFFFF} - нашел баг с рендером оыбчного песка')
			imgui.CenterTextColoredRGB( '{FFD000}Andrea_Popce{FFFFFF} - нашел баг с дистанцией закладок')
			imgui.CenterTextColoredRGB( '{FFD000}Rice.{FFFFFF} - предложил пофиксить размер статистики')
			imgui.CenterTextColoredRGB( '{FFD000}М.Dewerro{FFFFFF} - предложил добавить вх на лён и хлопок')
			imgui.CenterTextColoredRGB( '{FFD000}men4ik{FFFFFF} - предложил добавить ргб цвет')
			imgui.CenterTextColoredRGB( '{FFD000}Hvozdytskyy{FFFFFF} - предложил переделать рендер на руду')
			imgui.CenterTextColoredRGB( '{FFD000}Ukraine_Ua{FFFFFF} - предложил создать Украинскую тему')
			imgui.CenterTextColoredRGB( '{FFD000}w0te{FFFFFF} - нашел опечатку в названии меню')
			imgui.CenterTextColoredRGB( '{FFD000}v1seman{FFFFFF} - нашел опечатку в скрипте')
			imgui.CenterTextColoredRGB( '{FFD000}fvkbvck{FFFFFF} - нашел баг с рендером закладок')
			imgui.CenterTextColoredRGB( '{FFD000}kjor32{FFFFFF} - предложил добавить рендер на рванки')
			imgui.CenterTextColoredRGB( '{FFD000}amongsus{FFFFFF} - предложил добавить рендер на подарок')
			imgui.Text( ' ') 
			imgui.CenterTextColoredRGB( "{FFD000}{FFFFFF}Оставили конструктивный отзыв о скрипте на BlastHack")
			imgui.CenterTextColoredRGB( '{FFD000}Yankee{FFFFFF},{FFD000}izicapt{FFFFFF},{FFD000}FUNTIK777{FFFFFF},{FFD000}848ADS{FFFFFF},{FFD000}Rice.{FFFFFF}, ')
			imgui.CenterTextColoredRGB( '{FFD000}Chorty{FFFFFF},{FFD000}Hvozdytskyy{FFFFFF},{FFD000}zyo3331{FFFFFF},{FFD000}skayford{FFFFFF},{FFD000}Masay{FFFFFF}, ')
			imgui.CenterTextColoredRGB( '{FFD000}stizzys{FFFFFF},{FFD000}efdew{FFFFFF},{FFD000}F0RQU1N{FFFFFF},{FFD000}Toxic pig{FFFFFF},{FFD000}kjor32{FFFFFF}, ')
			imgui.CenterTextColoredRGB( '{FFD000}Kilari{FFFFFF},{FFD000}XXXAmogus{FFFFFF},{FFD000}Issaychik{FFFFFF},{FFD000}DaloikoWhat{FFFFFF},{FFD000}Taras_NePidoras{FFFFFF}, ')
			imgui.CenterTextColoredRGB( '{FFD000}Proper226{FFFFFF},{FFD000}furiouskek{FFFFFF},{FFD000}ZaZa228{FFFFFF},{FFD000}wswsw21{FFFFFF},{FFD000}Veniamin_Rush{FFFFFF}, ')
			imgui.CenterTextColoredRGB( '{FFD000}Chergoga{FFFFFF},{FFD000}PAShA_{FFFFFF},{FFD000}Cry{FFFFFF},{FFD000}imCyx{FFFFFF},{FFD000}rthrrhthrth{FFFFFF}, ')
			imgui.CenterTextColoredRGB( '{FFD000}Andrea_Popce{FFFFFF},{FFD000}ilywk4{FFFFFF},{FFD000}Benzo/{FFFFFF},{FFD000}MYKHALYCH{FFFFFF},{FFD000}Fenny{FFFFFF}, ')
			imgui.CenterTextColoredRGB( '{FFD000}Levar{FFFFFF},{FFD000}Aply{FFFFFF}{FFFFFF},{FFD000}Andrey_Coffe{FFFFFF},{FFD000}WeWorny{FFFFFF},{FFD000}men4ik{FFFFFF},{FFD000}ZalepoK{FFFFFF},{FFD000}')
			imgui.CenterTextColoredRGB( '{FFD000}Vice_sl49 ')
		 
			end
			menu4()
			if menu==1 then--вх на объекты
			
			menu1piar()
				
				
			if ng then
				imgui.SetCursorPosY(20)
				imgui.SetCursorPosX(0)
				imgui.Image(image, imgui.ImVec2(365, 311), imgui.ImVec2(0,0), imgui.ImVec2(1,1), imgui.ImVec4(1, 1, 1, 0.3))
			end
			if spr then
				imgui.SetCursorPosY(20)
				imgui.SetCursorPosX(0)
				imgui.Image(imagespr, imgui.ImVec2(365, 311), imgui.ImVec2(0,0), imgui.ImVec2(1,1), imgui.ImVec4(1, 1, 1, 0.3))
			end
			if summer then
				imgui.SetCursorPosY(20)
				imgui.SetCursorPosX(0)
				imgui.Image(imagesummer, imgui.ImVec2(365, 311), imgui.ImVec2(0,0), imgui.ImVec2(1,1), imgui.ImVec4(1, 1, 1, 0.3))
			end
			if autumn then
				imgui.SetCursorPosY(20)
				imgui.SetCursorPosX(0)
				imgui.Image(imageautumn, imgui.ImVec2(365, 311), imgui.ImVec2(0,0), imgui.ImVec2(1,1), imgui.ImVec4(1, 1, 1, 0.3))
			end
			if winter then
				imgui.SetCursorPosY(20)
				imgui.SetCursorPosX(0)
				imgui.Image(imagewinter, imgui.ImVec2(365, 311), imgui.ImVec2(0,0), imgui.ImVec2(1,1), imgui.ImVec4(1, 1, 1, 0.3))
			end
			if ua then
				imgui.SetCursorPosY(20)
				imgui.SetCursorPosX(0)
				imgui.Image(imageua, imgui.ImVec2(365, 311), imgui.ImVec2(0,0), imgui.ImVec2(1,1), imgui.ImVec4(1, 1, 1, 0.3))
			end
			if mart8 then
				imgui.SetCursorPosY(20)
				imgui.SetCursorPosX(0)
				imgui.Image(imagemart8, imgui.ImVec2(365, 311), imgui.ImVec2(0,0), imgui.ImVec2(1,1), imgui.ImVec4(1, 1, 1, 0.3))
			end
			if fev14 then
				imgui.SetCursorPosY(20)
				imgui.SetCursorPosX(0)
				imgui.Image(imagefev14, imgui.ImVec2(365, 311), imgui.ImVec2(0,0), imgui.ImVec2(1,1), imgui.ImVec4(1, 1, 1, 0.3))
			end
			if fev23 then
				imgui.SetCursorPosY(20)
				imgui.SetCursorPosX(0)
				imgui.Image(imagefev23, imgui.ImVec2(365, 311), imgui.ImVec2(0,0), imgui.ImVec2(1,1), imgui.ImVec4(1, 1, 1, 0.3))
			end
			if dr then
				imgui.SetCursorPosY(20)
				imgui.SetCursorPosX(0)
				imgui.Image(imagedr, imgui.ImVec2(365, 311), imgui.ImVec2(0,0), imgui.ImVec2(1,1), imgui.ImVec4(1, 1, 1, 0.3))
			end
--imgui.SetCursorPosX((imgui.GetWindowWidth() - 270)/2)
				imgui.SetCursorPosY(26)
				imgui.PushFont(fontsize)
				if imgui.Checkbox(u8'Олени', olen) then
					mainini.settings.olen=olen.v
					inicfg.save(mainini,directini)
					if narko.v then 
						raz = raz+1 
					end 
					if graffiti.v then 
						raz = raz+1
					end 
					if olen.v then 
						raz = raz+1 
					end 
					if podarok.v then
						raz = raz+1 
					end 
					if odejda.v then
						raz = raz+1
					end 
					if ryda.v then 
						raz = raz+1 
					end 
					if klad.v then
						raz = raz+1 
					end 
					if gun.v then 
						raz = raz+1 
					end 
					if semena.v then 
						raz = raz+1
					end 
					if lenn.v then
						raz = raz+1 
					end 
					if hlopok.v then
						raz = raz+1 
					end 
					razz = 23+raz * 17
				end
				imgui.SetCursorPos(imgui.ImVec2(133,3))
				imgui.SameLine()
				if imgui.Button(fa.ICON_FA_QUESTION) then
				oecreate('19315')
				end
				imgui.SameLine()
				imgui.PushItemWidth(100)
				imgui.SetCursorPosX(165)
				if imgui.Combo(u8'##163674442', variable, massiv)  then--выбор цвета
					if variable.v == 0 then colo = '0xFFFF0000' end
					if variable.v == 1 then colo = '0xFFFF8000' end
					if variable.v == 2 then colo = '0xFFffff00' end
					if variable.v == 3 then colo = '0xFF00ff00' end
					if variable.v == 4 then colo = '0xFF00bfff' end
					if variable.v == 5 then colo = '0xFF0000ff' end
					if variable.v == 6 then colo = '0xFF8000FF' end			
					if variable2.v == 0 then colo2 = '0xFFFF0000' end
					if variable2.v == 1 then colo2 = '0xFFFF8000' end
					if variable2.v == 2 then colo2 = '0xFFffff00' end
					if variable2.v == 3 then colo2 = '0xFF00ff00' end
					if variable2.v == 4 then colo2 = '0xFF00bfff' end
					if variable2.v == 5 then colo2 = '0xFF0000ff' end
					if variable2.v == 6 then colo2 = '0xFF8000FF' end
					if variable3.v == 0 then colo3 = '0xFFFF0000' end
					if variable3.v == 1 then colo3 = '0xFFFF8000' end
					if variable3.v == 2 then colo3 = '0xFFffff00' end
					if variable3.v == 3 then colo3 = '0xFF00ff00' end
					if variable3.v == 4 then colo3 = '0xFF00bfff' end
					if variable3.v == 5 then colo3 = '0xFF0000ff' end
					if variable3.v == 6 then colo3 = '0xFF8000FF' end
					if variable4.v == 0 then colo4 = '0xFFFF0000' end
					if variable4.v == 1 then colo4 = '0xFFFF8000' end
					if variable4.v == 2 then colo4 = '0xFFffff00' end
					if variable4.v == 3 then colo4 = '0xFF00ff00' end
					if variable4.v == 4 then colo4 = '0xFF00bfff' end
					if variable4.v == 5 then colo4 = '0xFF0000ff' end
					if variable4.v == 6 then colo4 = '0xFF8000FF' end
					if variable5.v == 0 then colo5 = '0xFFFF0000' end
					if variable5.v == 1 then colo5 = '0xFFFF8000' end
					if variable5.v == 2 then colo5 = '0xFFffff00' end
					if variable5.v == 3 then colo5 = '0xFF00ff00' end
					if variable5.v == 4 then colo5 = '0xFF00bfff' end
					if variable5.v == 5 then colo5 = '0xFF0000ff' end
					if variable5.v == 6 then colo5 = '0xFF8000FF' end
					if variable6.v == 0 then colo6 = '0xFFFF0000' end
					if variable6.v == 1 then colo6 = '0xFFFF8000' end
					if variable6.v == 2 then colo6 = '0xFFffff00' end
					if variable6.v == 3 then colo6 = '0xFF00ff00' end
					if variable6.v == 4 then colo6 = '0xFF00bfff' end
					if variable6.v == 5 then colo6 = '0xFF0000ff' end
					if variable6.v == 6 then colo6 = '0xFF8000FF' end
					if variable7.v == 0 then colo7 = '0xFFFF0000' end
					if variable7.v == 1 then colo7 = '0xFFFF8000' end
					if variable7.v == 2 then colo7 = '0xFFffff00' end
					if variable7.v == 3 then colo7 = '0xFF00ff00' end
					if variable7.v == 4 then colo7 = '0xFF00bfff' end
					if variable7.v == 5 then colo7 = '0xFF0000ff' end
					if variable7.v == 6 then colo7 = '0xFF8000FF' end
					if variable8.v == 0 then colo8 = '0xFFFF0000' end
					if variable8.v == 1 then colo8 = '0xFFFF8000' end
					if variable8.v == 2 then colo8 = '0xFFffff00' end
					if variable8.v == 3 then colo8 = '0xFF00ff00' end
					if variable8.v == 4 then colo8 = '0xFF00bfff' end
					if variable8.v == 5 then colo8 = '0xFF0000ff' end
					if variable8.v == 6 then colo8 = '0xFF8000FF' end	
					if variable9.v == 0 then colo9 = '0xFFFF0000' end
					if variable9.v == 1 then colo9 = '0xFFFF8000' end
					if variable9.v == 2 then colo9 = '0xFFffff00' end
					if variable9.v == 3 then colo9 = '0xFF00ff00' end
					if variable9.v == 4 then colo9 = '0xFF00bfff' end
					if variable9.v == 5 then colo9 = '0xFF0000ff' end
					if variable9.v == 6 then colo9 = '0xFF8000FF' end
					mainini.settings.variable=variable.v
					inicfg.save(mainini,directini)
				end
				if imgui.Checkbox(u8'Граффити', graffiti) then
					mainini.settings.graffiti=graffiti.v
					inicfg.save(mainini,directini)
					if narko.v then 
						raz = raz+1
					end 
					if graffiti.v then 
						raz = raz+1 
					end 
					if olen.v then
						raz = raz+1 
					end 
					if podarok.v then 
						raz = raz+1
					end 
					if odejda.v then
						raz = raz+1 
					end 
					if ryda.v then 
						raz = raz+1
					end 
					if klad.v then
						raz = raz+1
					end 
					if gun.v then
						raz = raz+1 
					end 
					if semena.v then 
						raz = raz+1
					end 
					if lenn.v then
						raz = raz+1 
					end 
					if hlopok.v then
						raz = raz+1 
					end 
					razz = 23+raz * 17
				end
				imgui.SameLine()
				if imgui.Button(fa.ICON_FA_QUESTION..'##123ффывфывывфывcdassdw') then
				--oecreate('2680')
				 lua_thread.create(function()
				 
				 
				   
				    
				   
				if deltext then
sampDestroy3dText(id1)
else			
local result, atX, atY, atZ = getCoordinatesInFrontOfChar(PLAYER_PED, 1.5)	
id1 = sampCreate3dText("Grove Street Можно закрасить через", 4294967295.0, atX, atY, atZ, 15, false, -1, -1)
end
	end)
	deltext = not deltext
				end
				imgui.SameLine()
				if imgui.Button(fa.ICON_FA_COG)then
					main_window_state2.v = not main_window_state2.v
				end
				if imgui.Checkbox(u8'Закладки', narko) then
					mainini.settings.narko=narko.v
					inicfg.save(mainini,directini)
					if narko.v then 
						raz = raz+1 
					end --
					if graffiti.v then 
						raz = raz+1 
					end 
					if olen.v then 
						raz = raz+1
					end 
					if podarok.v then
						raz = raz+1 
					end 
					if odejda.v then 
						raz = raz+1
					end 
					if ryda.v then
						raz = raz+1
					end 
					if klad.v then
						raz = raz+1
					end 
					if gun.v then
						raz = raz+1 
					end 
					if semena.v then
						raz = raz+1 
					end 
					if lenn.v then
						raz = raz+1 
					end 
					if hlopok.v then
						raz = raz+1 
					end 
					razz = 23+raz * 17
				end
				imgui.SameLine()
				if imgui.Button(fa.ICON_FA_QUESTION..'##123фывфывcdassdw') then
				--oecreate('2680')
				 lua_thread.create(function()
				 
				 
				   
				    
				   
				if deltext then
sampDestroy3dText(id1)
else			
local result, atX, atY, atZ = getCoordinatesInFrontOfChar(PLAYER_PED, 1.5)	
id1 = sampCreate3dText("Используйте {CFF277}ALT{FFFFFF} чтобы подобрать", 4294967295.0, atX, atY, atZ, 15, false, -1, -1)
end
	end)
	deltext = not deltext
				end
				imgui.SameLine()
				imgui.PushItemWidth(100)
				imgui.SetCursorPosX(165)
				if imgui.Combo(u8'##df3fddsfd', variable3, massiv)  then--выбор цвета
					if variable.v == 0 then colo = '0xFFFF0000' end
					if variable.v == 1 then colo = '0xFFFF8000' end
					if variable.v == 2 then colo = '0xFFffff00' end
					if variable.v == 3 then colo = '0xFF00ff00' end
					if variable.v == 4 then colo = '0xFF00bfff' end
					if variable.v == 5 then colo = '0xFF0000ff' end
					if variable.v == 6 then colo = '0xFF8000FF' end			
					if variable2.v == 0 then colo2 = '0xFFFF0000' end
					if variable2.v == 1 then colo2 = '0xFFFF8000' end
					if variable2.v == 2 then colo2 = '0xFFffff00' end
					if variable2.v == 3 then colo2 = '0xFF00ff00' end
					if variable2.v == 4 then colo2 = '0xFF00bfff' end
					if variable2.v == 5 then colo2 = '0xFF0000ff' end
					if variable2.v == 6 then colo2 = '0xFF8000FF' end
					if variable3.v == 0 then colo3 = '0xFFFF0000' end
					if variable3.v == 1 then colo3 = '0xFFFF8000' end
					if variable3.v == 2 then colo3 = '0xFFffff00' end
					if variable3.v == 3 then colo3 = '0xFF00ff00' end
					if variable3.v == 4 then colo3 = '0xFF00bfff' end
					if variable3.v == 5 then colo3 = '0xFF0000ff' end
					if variable3.v == 6 then colo3 = '0xFF8000FF' end
					if variable4.v == 0 then colo4 = '0xFFFF0000' end
					if variable4.v == 1 then colo4 = '0xFFFF8000' end
					if variable4.v == 2 then colo4 = '0xFFffff00' end
					if variable4.v == 3 then colo4 = '0xFF00ff00' end
					if variable4.v == 4 then colo4 = '0xFF00bfff' end
					if variable4.v == 5 then colo4 = '0xFF0000ff' end
					if variable4.v == 6 then colo4 = '0xFF8000FF' end
					if variable5.v == 0 then colo5 = '0xFFFF0000' end
					if variable5.v == 1 then colo5 = '0xFFFF8000' end
					if variable5.v == 2 then colo5 = '0xFFffff00' end
					if variable5.v == 3 then colo5 = '0xFF00ff00' end
					if variable5.v == 4 then colo5 = '0xFF00bfff' end
					if variable5.v == 5 then colo5 = '0xFF0000ff' end
					if variable5.v == 6 then colo5 = '0xFF8000FF' end
					if variable6.v == 0 then colo6 = '0xFFFF0000' end
					if variable6.v == 1 then colo6 = '0xFFFF8000' end
					if variable6.v == 2 then colo6 = '0xFFffff00' end
					if variable6.v == 3 then colo6 = '0xFF00ff00' end
					if variable6.v == 4 then colo6 = '0xFF00bfff' end
					if variable6.v == 5 then colo6 = '0xFF0000ff' end
					if variable6.v == 6 then colo6 = '0xFF8000FF' end	
					if variable7.v == 0 then colo7 = '0xFFFF0000' end
					if variable7.v == 1 then colo7 = '0xFFFF8000' end
					if variable7.v == 2 then colo7 = '0xFFffff00' end
					if variable7.v == 3 then colo7 = '0xFF00ff00' end
					if variable7.v == 4 then colo7 = '0xFF00bfff' end
					if variable7.v == 5 then colo7 = '0xFF0000ff' end
					if variable7.v == 6 then colo7 = '0xFF8000FF' end
					if variable8.v == 0 then colo8 = '0xFFFF0000' end
					if variable8.v == 1 then colo8 = '0xFFFF8000' end
					if variable8.v == 2 then colo8 = '0xFFffff00' end
					if variable8.v == 3 then colo8 = '0xFF00ff00' end
					if variable8.v == 4 then colo8 = '0xFF00bfff' end
					if variable8.v == 5 then colo8 = '0xFF0000ff' end
					if variable8.v == 6 then colo8 = '0xFF8000FF' end
					if variable9.v == 0 then colo9 = '0xFFFF0000' end
					if variable9.v == 1 then colo9 = '0xFFFF8000' end
					if variable9.v == 2 then colo9 = '0xFFffff00' end
					if variable9.v == 3 then colo9 = '0xFF00ff00' end
					if variable9.v == 4 then colo9 = '0xFF00bfff' end
					if variable9.v == 5 then colo9 = '0xFF0000ff' end
					if variable9.v == 6 then colo9 = '0xFF8000FF' end
					mainini.settings.variable3=variable3.v
					inicfg.save(mainini,directini)
				end
				if imgui.Checkbox(u8'Рванка', podarok) then
					mainini.settings.podarok=podarok.v
					inicfg.save(mainini,directini)
					if narko.v then 
						raz = raz+1 
					end 
					if graffiti.v then
						raz = raz+1
					end 
					if olen.v then 
						raz = raz+1 
					end 
					if podarok.v then 
						raz = raz+1 
					end 
					if odejda.v then 
						raz = raz+1 
					end 
					if ryda.v then
						raz = raz+1 
					end 
					if klad.v then
						raz = raz+1 
					end 
					if gun.v then
						raz = raz+1 
					end 
					if semena.v then
						raz = raz+1 
					end 
					if lenn.v then
						raz = raz+1 
					end 
					if hlopok.v then
						raz = raz+1 
					end 
					razz = 23+raz * 17
				end
				imgui.SameLine()
				if imgui.Button(fa.ICON_FA_QUESTION..'##221312341342') then
				oecreate('2844')
				end
				imgui.SameLine()
				imgui.PushItemWidth(100)
				imgui.SetCursorPosX(165)
				if imgui.Combo(u8'##dfgdr433dsd', variable4, massiv)  then
					if variable.v == 0 then colo = '0xFFFF0000' end
					if variable.v == 1 then colo = '0xFFFF8000' end
					if variable.v == 2 then colo = '0xFFffff00' end
					if variable.v == 3 then colo = '0xFF00ff00' end
					if variable.v == 4 then colo = '0xFF00bfff' end
					if variable.v == 5 then colo = '0xFF0000ff' end
					if variable.v == 6 then colo = '0xFF8000FF' end				
					if variable2.v == 0 then colo2 = '0xFFFF0000' end
					if variable2.v == 1 then colo2 = '0xFFFF8000' end
					if variable2.v == 2 then colo2 = '0xFFffff00' end
					if variable2.v == 3 then colo2 = '0xFF00ff00' end
					if variable2.v == 4 then colo2 = '0xFF00bfff' end
					if variable2.v == 5 then colo2 = '0xFF0000ff' end
					if variable2.v == 6 then colo2 = '0xFF8000FF' end
					if variable3.v == 0 then colo3 = '0xFFFF0000' end
					if variable3.v == 1 then colo3 = '0xFFFF8000' end
					if variable3.v == 2 then colo3 = '0xFFffff00' end
					if variable3.v == 3 then colo3 = '0xFF00ff00' end
					if variable3.v == 4 then colo3 = '0xFF00bfff' end
					if variable3.v == 5 then colo3 = '0xFF0000ff' end
					if variable3.v == 6 then colo3 = '0xFF8000FF' end
					if variable4.v == 0 then colo4 = '0xFFFF0000' end
					if variable4.v == 1 then colo4 = '0xFFFF8000' end
					if variable4.v == 2 then colo4 = '0xFFffff00' end
					if variable4.v == 3 then colo4 = '0xFF00ff00' end
					if variable4.v == 4 then colo4 = '0xFF00bfff' end
					if variable4.v == 5 then colo4 = '0xFF0000ff' end
					if variable4.v == 6 then colo4 = '0xFF8000FF' end
					if variable5.v == 0 then colo5 = '0xFFFF0000' end
					if variable5.v == 1 then colo5 = '0xFFFF8000' end
					if variable5.v == 2 then colo5 = '0xFFffff00' end
					if variable5.v == 3 then colo5 = '0xFF00ff00' end
					if variable5.v == 4 then colo5 = '0xFF00bfff' end
					if variable5.v == 5 then colo5 = '0xFF0000ff' end
					if variable5.v == 6 then colo5 = '0xFF8000FF' end
					if variable6.v == 0 then colo6 = '0xFFFF0000' end
					if variable6.v == 1 then colo6 = '0xFFFF8000' end
					if variable6.v == 2 then colo6 = '0xFFffff00' end
					if variable6.v == 3 then colo6 = '0xFF00ff00' end
					if variable6.v == 4 then colo6 = '0xFF00bfff' end
					if variable6.v == 5 then colo6 = '0xFF0000ff' end
					if variable6.v == 6 then colo6 = '0xFF8000FF' end
					if variable7.v == 0 then colo7 = '0xFFFF0000' end
					if variable7.v == 1 then colo7 = '0xFFFF8000' end
					if variable7.v == 2 then colo7 = '0xFFffff00' end
					if variable7.v == 3 then colo7 = '0xFF00ff00' end
					if variable7.v == 4 then colo7 = '0xFF00bfff' end
					if variable7.v == 5 then colo7 = '0xFF0000ff' end
					if variable7.v == 6 then colo7 = '0xFF8000FF' end
					if variable8.v == 0 then colo8 = '0xFFFF0000' end
					if variable8.v == 1 then colo8 = '0xFFFF8000' end
					if variable8.v == 2 then colo8 = '0xFFffff00' end
					if variable8.v == 3 then colo8 = '0xFF00ff00' end
					if variable8.v == 4 then colo8 = '0xFF00bfff' end
					if variable8.v == 5 then colo8 = '0xFF0000ff' end
					if variable8.v == 6 then colo8 = '0xFF8000FF' end
					if variable9.v == 0 then colo9 = '0xFFFF0000' end
					if variable9.v == 1 then colo9 = '0xFFFF8000' end
					if variable9.v == 2 then colo9 = '0xFFffff00' end
					if variable9.v == 3 then colo9 = '0xFF00ff00' end
					if variable9.v == 4 then colo9 = '0xFF00bfff' end
					if variable9.v == 5 then colo9 = '0xFF0000ff' end
					if variable9.v == 6 then colo9 = '0xFF8000FF' end
					mainini.settings.variable4=variable4.v
					inicfg.save(mainini,directini)
				end
				if imgui.Checkbox(u8'Руды', ryda) then
					mainini.settings.ryda=ryda.v
					inicfg.save(mainini,directini)
					if narko.v then raz = raz+1 end --
				if graffiti.v then raz = raz+1 end --
				if olen.v then raz = raz+1 end --
				if podarok.v then raz = raz+1 end --
				if odejda.v then raz = raz+1 end --
				if ryda.v then raz = raz+1 end --
				if klad.v then raz = raz+1 end --
				if gun.v then raz = raz+1 end --
				if semena.v then raz = raz+1 end --
				if lenn.v then raz = raz+1 end --
				if hlopok.v then raz = raz+1 end ---
					razz = 23+raz * 17
				end
			imgui.SameLine()
				if imgui.Button(fa.ICON_FA_QUESTION..'##123ффывфыфыввывфывcdassdw') then
				--oecreate('2680')
				 lua_thread.create(function()
				 
				   
				if deltext then
sampDestroy3dText(id1)
else			
local result, atX, atY, atZ = getCoordinatesInFrontOfChar(PLAYER_PED, 1.5)	
id1 = sampCreate3dText("Месторождение ресурсов", 4294967295.0, atX, atY, atZ, 15, false, -1, -1)
end
	end)
	deltext = not deltext
				end
			if imgui.Checkbox(u8'Клады', klad) then
				mainini.settings.klad=klad.v
				inicfg.save(mainini,directini)
				if narko.v then raz = raz+1 end --
				if graffiti.v then raz = raz+1 end --
				if olen.v then raz = raz+1 end --
				if podarok.v then raz = raz+1 end --
				if odejda.v then raz = raz+1 end --
				if ryda.v then raz = raz+1 end --
				if klad.v then raz = raz+1 end --
				if gun.v then raz = raz+1 end --
				if semena.v then raz = raz+1 end --
				if lenn.v then raz = raz+1 end --
				if hlopok.v then raz = raz+1 end --
				razz = 23+raz * 17
			end
			imgui.SameLine()
				if imgui.Button(fa.ICON_FA_QUESTION..'##123cdasdw') then
				oecreate('2680')
				end
			imgui.SameLine()
			imgui.PushItemWidth(100)
			imgui.SetCursorPosX(165)
			if imgui.Combo(u8'##dfвапвапфв3dsd', variable7, massiv)  then
				if variable.v == 0 then colo = '0xFFFF0000' end
				if variable.v == 1 then colo = '0xFFFF8000' end
				if variable.v == 2 then colo = '0xFFffff00' end
				if variable.v == 3 then colo = '0xFF00ff00' end
				if variable.v == 4 then colo = '0xFF00bfff' end
				if variable.v == 5 then colo = '0xFF0000ff' end
				if variable.v == 6 then colo = '0xFF8000FF' end		
				if variable2.v == 0 then colo2 = '0xFFFF0000' end
				if variable2.v == 1 then colo2 = '0xFFFF8000' end
				if variable2.v == 2 then colo2 = '0xFFffff00' end
				if variable2.v == 3 then colo2 = '0xFF00ff00' end
				if variable2.v == 4 then colo2 = '0xFF00bfff' end
				if variable2.v == 5 then colo2 = '0xFF0000ff' end
				if variable2.v == 6 then colo2 = '0xFF8000FF' end
				if variable3.v == 0 then colo3 = '0xFFFF0000' end
				if variable3.v == 1 then colo3 = '0xFFFF8000' end
				if variable3.v == 2 then colo3 = '0xFFffff00' end
				if variable3.v == 3 then colo3 = '0xFF00ff00' end
				if variable3.v == 4 then colo3 = '0xFF00bfff' end
				if variable3.v == 5 then colo3 = '0xFF0000ff' end
				if variable3.v == 6 then colo3 = '0xFF8000FF' end
				if variable4.v == 0 then colo4 = '0xFFFF0000' end
				if variable4.v == 1 then colo4 = '0xFFFF8000' end
				if variable4.v == 2 then colo4 = '0xFFffff00' end
				if variable4.v == 3 then colo4 = '0xFF00ff00' end
				if variable4.v == 4 then colo4 = '0xFF00bfff' end
				if variable4.v == 5 then colo4 = '0xFF0000ff' end
				if variable4.v == 6 then colo4 = '0xFF8000FF' end
				if variable5.v == 0 then colo5 = '0xFFFF0000' end
				if variable5.v == 1 then colo5 = '0xFFFF8000' end
				if variable5.v == 2 then colo5 = '0xFFffff00' end
				if variable5.v == 3 then colo5 = '0xFF00ff00' end
				if variable5.v == 4 then colo5 = '0xFF00bfff' end
				if variable5.v == 5 then colo5 = '0xFF0000ff' end
				if variable5.v == 6 then colo5 = '0xFF8000FF' end
				if variable6.v == 0 then colo6 = '0xFFFF0000' end
				if variable6.v == 1 then colo6 = '0xFFFF8000' end
				if variable6.v == 2 then colo6 = '0xFFffff00' end
				if variable6.v == 3 then colo6 = '0xFF00ff00' end
				if variable6.v == 4 then colo6 = '0xFF00bfff' end
				if variable6.v == 5 then colo6 = '0xFF0000ff' end
				if variable6.v == 6 then colo6 = '0xFF8000FF' end
				if variable7.v == 0 then colo7 = '0xFFFF0000' end
				if variable7.v == 1 then colo7 = '0xFFFF8000' end
				if variable7.v == 2 then colo7 = '0xFFffff00' end
				if variable7.v == 3 then colo7 = '0xFF00ff00' end
				if variable7.v == 4 then colo7 = '0xFF00bfff' end
				if variable7.v == 5 then colo7 = '0xFF0000ff' end
				if variable7.v == 6 then colo7 = '0xFF8000FF' end
				if variable8.v == 0 then colo8 = '0xFFFF0000' end
				if variable8.v == 1 then colo8 = '0xFFFF8000' end
				if variable8.v == 2 then colo8 = '0xFFffff00' end
				if variable8.v == 3 then colo8 = '0xFF00ff00' end
				if variable8.v == 4 then colo8 = '0xFF00bfff' end
				if variable8.v == 5 then colo8 = '0xFF0000ff' end
				if variable8.v == 6 then colo8 = '0xFF8000FF' end
				if variable9.v == 0 then colo9 = '0xFFFF0000' end
				if variable9.v == 1 then colo9 = '0xFFFF8000' end
				if variable9.v == 2 then colo9 = '0xFFffff00' end
				if variable9.v == 3 then colo9 = '0xFF00ff00' end
				if variable9.v == 4 then colo9 = '0xFF00bfff' end
				if variable9.v == 5 then colo9 = '0xFF0000ff' end
				if variable9.v == 6 then colo9 = '0xFF8000FF' end
				mainini.settings.variable7=variable7.v
				inicfg.save(mainini,directini)
			end
			
			if imgui.Checkbox(u8'Оружие', gun) then
				mainini.settings.gun=gun.v
				inicfg.save(mainini,directini)
				if narko.v then raz = raz+1 end --
				if graffiti.v then raz = raz+1 end --
				if olen.v then raz = raz+1 end --
				if podarok.v then raz = raz+1 end --
				if odejda.v then raz = raz+1 end --
				if ryda.v then raz = raz+1 end --
				if klad.v then raz = raz+1 end --
				if gun.v then raz = raz+1 end --
				if semena.v then raz = raz+1 end --
				if lenn.v then raz = raz+1 end --
				if hlopok.v then raz = raz+1 end --
				razz = 23+raz * 17
			end
			imgui.SameLine()
				if imgui.Button(fa.ICON_FA_QUESTION..'##2213123ы41342') then
				oecreate('348')
				end
			imgui.SameLine()
			imgui.PushItemWidth(100)
			imgui.SetCursorPosX(165)
			if imgui.Combo(u8'##df3апавпавпdsd', variable8, massiv)  then
				if variable.v == 0 then colo = '0xFFFF0000' end
				if variable.v == 1 then colo = '0xFFFF8000' end
				if variable.v == 2 then colo = '0xFFffff00' end
				if variable.v == 3 then colo = '0xFF00ff00' end
				if variable.v == 4 then colo = '0xFF00bfff' end
				if variable.v == 5 then colo = '0xFF0000ff' end
				if variable.v == 6 then colo = '0xFF8000FF' end			
				if variable2.v == 0 then colo2 = '0xFFFF0000' end
				if variable2.v == 1 then colo2 = '0xFFFF8000' end
				if variable2.v == 2 then colo2 = '0xFFffff00' end
				if variable2.v == 3 then colo2 = '0xFF00ff00' end
				if variable2.v == 4 then colo2 = '0xFF00bfff' end
				if variable2.v == 5 then colo2 = '0xFF0000ff' end
				if variable2.v == 6 then colo2 = '0xFF8000FF' end
				if variable3.v == 0 then colo3 = '0xFFFF0000' end
				if variable3.v == 1 then colo3 = '0xFFFF8000' end
				if variable3.v == 2 then colo3 = '0xFFffff00' end
				if variable3.v == 3 then colo3 = '0xFF00ff00' end
				if variable3.v == 4 then colo3 = '0xFF00bfff' end
				if variable3.v == 5 then colo3 = '0xFF0000ff' end
				if variable3.v == 6 then colo3 = '0xFF8000FF' end
				if variable4.v == 0 then colo4 = '0xFFFF0000' end
				if variable4.v == 1 then colo4 = '0xFFFF8000' end
				if variable4.v == 2 then colo4 = '0xFFffff00' end
				if variable4.v == 3 then colo4 = '0xFF00ff00' end
				if variable4.v == 4 then colo4 = '0xFF00bfff' end
				if variable4.v == 5 then colo4 = '0xFF0000ff' end
				if variable4.v == 6 then colo4 = '0xFF8000FF' end
				if variable5.v == 0 then colo5 = '0xFFFF0000' end
				if variable5.v == 1 then colo5 = '0xFFFF8000' end
				if variable5.v == 2 then colo5 = '0xFFffff00' end
				if variable5.v == 3 then colo5 = '0xFF00ff00' end
				if variable5.v == 4 then colo5 = '0xFF00bfff' end
				if variable5.v == 5 then colo5 = '0xFF0000ff' end
				if variable5.v == 6 then colo5 = '0xFF8000FF' end
				if variable6.v == 0 then colo6 = '0xFFFF0000' end
				if variable6.v == 1 then colo6 = '0xFFFF8000' end
				if variable6.v == 2 then colo6 = '0xFFffff00' end
				if variable6.v == 3 then colo6 = '0xFF00ff00' end
				if variable6.v == 4 then colo6 = '0xFF00bfff' end
				if variable6.v == 5 then colo6 = '0xFF0000ff' end
				if variable6.v == 6 then colo6 = '0xFF8000FF' end
				if variable7.v == 0 then colo7 = '0xFFFF0000' end
				if variable7.v == 1 then colo7 = '0xFFFF8000' end
				if variable7.v == 2 then colo7 = '0xFFffff00' end
				if variable7.v == 3 then colo7 = '0xFF00ff00' end
				if variable7.v == 4 then colo7 = '0xFF00bfff' end
				if variable7.v == 5 then colo7 = '0xFF0000ff' end
				if variable7.v == 6 then colo7 = '0xFF8000FF' end
				if variable8.v == 0 then colo8 = '0xFFFF0000' end
				if variable8.v == 1 then colo8 = '0xFFFF8000' end
				if variable8.v == 2 then colo8 = '0xFFffff00' end
				if variable8.v == 3 then colo8 = '0xFF00ff00' end
				if variable8.v == 4 then colo8 = '0xFF00bfff' end
				if variable8.v == 5 then colo8 = '0xFF0000ff' end
				if variable8.v == 6 then colo8 = '0xFF8000FF' end
				if variable9.v == 0 then colo9 = '0xFFFF0000' end
				if variable9.v == 1 then colo9 = '0xFFFF8000' end
				if variable9.v == 2 then colo9 = '0xFFffff00' end
				if variable9.v == 3 then colo9 = '0xFF00ff00' end
				if variable9.v == 4 then colo9 = '0xFF00bfff' end
				if variable9.v == 5 then colo9 = '0xFF0000ff' end
				if variable9.v == 6 then colo9 = '0xFF8000FF' end
				mainini.settings.variable8=variable8.v
				inicfg.save(mainini,directini)
			end
			
			if imgui.Checkbox(u8'Семена', semena) then
				mainini.settings.semena=semena.v
				inicfg.save(mainini,directini)
				if narko.v then raz = raz+1 end --
				if graffiti.v then raz = raz+1 end --
				if olen.v then raz = raz+1 end --
				if podarok.v then raz = raz+1 end --
				if odejda.v then raz = raz+1 end --
				if ryda.v then raz = raz+1 end --
				if klad.v then raz = raz+1 end --
				if gun.v then raz = raz+1 end --
				if semena.v then raz = raz+1 end --
				if lenn.v then raz = raz+1 end --
				if hlopok.v then raz = raz+1 end --
				razz = 23+raz * 17
			end
			imgui.SameLine()
				if imgui.Button(fa.ICON_FA_QUESTION..'##2213123413242') then
				oecreate('859')
				end
			imgui.SameLine()
			imgui.PushItemWidth(100)
			imgui.SetCursorPosX(165)
			if imgui.Combo(u8'##dываываf3dsd', variable9, massiv)  then
				if variable.v == 0 then colo = '0xFFFF0000' end
				if variable.v == 1 then colo = '0xFFFF8000' end
				if variable.v == 2 then colo = '0xFFffff00' end
				if variable.v == 3 then colo = '0xFF00ff00' end
				if variable.v == 4 then colo = '0xFF00bfff' end
				if variable.v == 5 then colo = '0xFF0000ff' end
				if variable.v == 6 then colo = '0xFF8000FF' end		
				if variable2.v == 0 then colo2 = '0xFFFF0000' end
				if variable2.v == 1 then colo2 = '0xFFFF8000' end
				if variable2.v == 2 then colo2 = '0xFFffff00' end
				if variable2.v == 3 then colo2 = '0xFF00ff00' end
				if variable2.v == 4 then colo2 = '0xFF00bfff' end
				if variable2.v == 5 then colo2 = '0xFF0000ff' end
				if variable2.v == 6 then colo2 = '0xFF8000FF' end
				if variable3.v == 0 then colo3 = '0xFFFF0000' end
				if variable3.v == 1 then colo3 = '0xFFFF8000' end
				if variable3.v == 2 then colo3 = '0xFFffff00' end
				if variable3.v == 3 then colo3 = '0xFF00ff00' end
				if variable3.v == 4 then colo3 = '0xFF00bfff' end
				if variable3.v == 5 then colo3 = '0xFF0000ff' end
				if variable3.v == 6 then colo3 = '0xFF8000FF' end
				if variable4.v == 0 then colo4 = '0xFFFF0000' end
				if variable4.v == 1 then colo4 = '0xFFFF8000' end
				if variable4.v == 2 then colo4 = '0xFFffff00' end
				if variable4.v == 3 then colo4 = '0xFF00ff00' end
				if variable4.v == 4 then colo4 = '0xFF00bfff' end
				if variable4.v == 5 then colo4 = '0xFF0000ff' end
				if variable4.v == 6 then colo4 = '0xFF8000FF' end
				if variable5.v == 0 then colo5 = '0xFFFF0000' end
				if variable5.v == 1 then colo5 = '0xFFFF8000' end
				if variable5.v == 2 then colo5 = '0xFFffff00' end
				if variable5.v == 3 then colo5 = '0xFF00ff00' end
				if variable5.v == 4 then colo5 = '0xFF00bfff' end
				if variable5.v == 5 then colo5 = '0xFF0000ff' end
				if variable5.v == 6 then colo5 = '0xFF8000FF' end
				if variable6.v == 0 then colo6 = '0xFFFF0000' end
				if variable6.v == 1 then colo6 = '0xFFFF8000' end
				if variable6.v == 2 then colo6 = '0xFFffff00' end
				if variable6.v == 3 then colo6 = '0xFF00ff00' end
				if variable6.v == 4 then colo6 = '0xFF00bfff' end
				if variable6.v == 5 then colo6 = '0xFF0000ff' end
				if variable6.v == 6 then colo6 = '0xFF8000FF' end
				if variable7.v == 0 then colo7 = '0xFFFF0000' end
				if variable7.v == 1 then colo7 = '0xFFFF8000' end
				if variable7.v == 2 then colo7 = '0xFFffff00' end
				if variable7.v == 3 then colo7 = '0xFF00ff00' end
				if variable7.v == 4 then colo7 = '0xFF00bfff' end
				if variable7.v == 5 then colo7 = '0xFF0000ff' end
				if variable7.v == 6 then colo7 = '0xFF8000FF' end
				if variable8.v == 0 then colo8 = '0xFFFF0000' end
				if variable8.v == 1 then colo8 = '0xFFFF8000' end
				if variable8.v == 2 then colo8 = '0xFFffff00' end
				if variable8.v == 3 then colo8 = '0xFF00ff00' end
				if variable8.v == 4 then colo8 = '0xFF00bfff' end
				if variable8.v == 5 then colo8 = '0xFF0000ff' end
				if variable8.v == 6 then colo8 = '0xFF8000FF' end
				if variable9.v == 0 then colo9 = '0xFFFF0000' end
				if variable9.v == 1 then colo9 = '0xFFFF8000' end
				if variable9.v == 2 then colo9 = '0xFFffff00' end
				if variable9.v == 3 then colo9 = '0xFF00ff00' end
				if variable9.v == 4 then colo9 = '0xFF00bfff' end
				if variable9.v == 5 then colo9 = '0xFF0000ff' end
				if variable9.v == 6 then colo9 = '0xFF8000FF' end
				mainini.settings.variable9=variable9.v
				inicfg.save(mainini,directini)
			end
			
			if imgui.Checkbox(u8'Лён', lenn) then
				mainini.settings.lenn=lenn.v
				inicfg.save(mainini,directini)
				if narko.v then raz = raz+1 end --
				if graffiti.v then raz = raz+1 end --
				if olen.v then raz = raz+1 end --
				if podarok.v then raz = raz+1 end --
				if odejda.v then raz = raz+1 end --
				if ryda.v then raz = raz+1 end --
				if klad.v then raz = raz+1 end --
				if gun.v then raz = raz+1 end --
				if semena.v then raz = raz+1 end --
				if lenn.v then raz = raz+1 end --
				if hlopok.v then raz = raz+1 end --
				razz = 23+raz * 17
			end
			imgui.SameLine()
				if imgui.Button(fa.ICON_FA_QUESTION..'##123ффывфыыфыввывфывcdassdw') then
				--oecreate('2680')
				 lua_thread.create(function()
				 
				   
				if deltext then
sampDestroy3dText(id1)
else			
local result, atX, atY, atZ = getCoordinatesInFrontOfChar(PLAYER_PED, 1.5)	
id1 = sampCreate3dText("Лён(10 из 10)", 4294967295.0, atX, atY, atZ, 15, false, -1, -1)
end
	end)
	deltext = not deltext
				end
			 if imgui.Checkbox(u8'Хлопок', hlopok) then
				mainini.settings.hlopok=hlopok.v
				inicfg.save(mainini,directini)
				if narko.v then raz = raz+1 end --
				if graffiti.v then raz = raz+1 end --
				if olen.v then raz = raz+1 end --
				if podarok.v then raz = raz+1 end --
				if odejda.v then raz = raz+1 end --
				if ryda.v then raz = raz+1 end --
				if klad.v then raz = raz+1 end --
				if gun.v then raz = raz+1 end --
				if semena.v then raz = raz+1 end --
				if lenn.v then raz = raz+1 end --
				if hlopok.v then raz = raz+1 end --
				razz = 23+raz * 17
			end
			imgui.SameLine()
				if imgui.Button(fa.ICON_FA_QUESTION..'##123ффывффывыыфыввывфывcdassdw') then
				--oecreate('2680')
				 lua_thread.create(function()
				 
				   
				if deltext then
sampDestroy3dText(id1)
else			
local result, atX, atY, atZ = getCoordinatesInFrontOfChar(PLAYER_PED, 1.5)	
id1 = sampCreate3dText("Хлопок(10 из 10)", 4294967295.0, atX, atY, atZ, 15, false, -1, -1)
end
	end)
	deltext = not deltext
				end
			
			if imgui.Button(u8'Выключить все рендеры',(imgui.ImVec2(-1,19))) then
				olen.v = false mainini.settings.olen=olen.v
				graffiti.v = false mainini.settings.graffiti=graffiti.v
				narko.v = false mainini.settings.narko=narko.v
				podarok.v = false mainini.settings.podarok=podarok.v
				odejda.v = false mainini.settings.odejda=odejda.v
				ryda.v = false mainini.settings.ryda=ryda.v
				klad.v = false mainini.settings.klad=klad.v
				gun.v = false mainini.settings.gun=gun.v
				semena.v = false mainini.settings.semena=semena.v
				lenn.v = false mainini.settings.lenn=lenn.v
				hlopok.v = false mainini.settings.semena=hlopok.v
				inicfg.save(mainini,directini)
				if narko.v then raz = raz+1 end --
				if graffiti.v then raz = raz+1 end --
				if olen.v then raz = raz+1 end --
				if podarok.v then raz = raz+1 end --
				if odejda.v then raz = raz+1 end --
				if ryda.v then raz = raz+1 end --
				if klad.v then raz = raz+1 end --
				if gun.v then raz = raz+1 end --
				if semena.v then raz = raz+1 end --
				if lenn.v then raz = raz+1 end --
				if hlopok.v then raz = raz+1 end --
				razz = 23+raz * 17
			end
			if imgui.Button(u8'Включить все рендеры',(imgui.ImVec2(-1,19))) then
				olen.v = true mainini.settings.olen=olen.v
				graffiti.v = true mainini.settings.graffiti=graffiti.v
				narko.v = true mainini.settings.narko=narko.v
				podarok.v = true mainini.settings.podarok=podarok.v
				odejda.v = true mainini.settings.odejda=odejda.v
				ryda.v = true mainini.settings.ryda=ryda.v
				klad.v = true mainini.settings.klad=klad.v
				gun.v = true mainini.settings.gun=gun.v
				semena.v = true mainini.settings.semena=semena.v
				lenn.v = true mainini.settings.lenn=lenn.v
				hlopok.v = true mainini.settings.hlopok=hlopok.v
				inicfg.save(mainini,directini)
				if narko.v then raz = raz+1 end --
				if graffiti.v then raz = raz+1 end --
				if olen.v then raz = raz+1 end --
				if podarok.v then raz = raz+1 end --
				if odejda.v then raz = raz+1 end --
				if ryda.v then raz = raz+1 end --
				if klad.v then raz = raz+1 end --
				if gun.v then raz = raz+1 end --
				if semena.v then raz = raz+1 end --
				if lenn.v then raz = raz+1 end --
				if hlopok.v then raz = raz+1 end --
				razz = 23+raz * 17
			end
			
			if imgui.Button(u8'В меню',(imgui.ImVec2(-1,19))) then
				menu = 0
				visota=215
				shirina=365
			end
			imgui.SetCursorPos(imgui.ImVec2(333,3))
			imgui.VerticalSeparator()
			imgui.PopFont()
		
		end
		if menu == 2 then--настройки
		piarsr2()
		if ng then
			imgui.SetCursorPosY(20)
			imgui.SetCursorPosX(0)
			imgui.Image(image, imgui.ImVec2(346, 340), imgui.ImVec2(0,0), imgui.ImVec2(1,1), imgui.ImVec4(1, 1, 1, 0.3))	  
			imgui.SetCursorPosX((imgui.GetWindowWidth() - 270)/2)
			imgui.SetCursorPosY(26)
		end
		if spr then
			imgui.SetCursorPosY(20)
			imgui.SetCursorPosX(0)
			imgui.Image(imagespr, imgui.ImVec2(346, 340), imgui.ImVec2(0,0), imgui.ImVec2(1,1), imgui.ImVec4(1, 1, 1, 0.3))	  
			imgui.SetCursorPosX((imgui.GetWindowWidth() - 270)/2)
			imgui.SetCursorPosY(26)
		end
		if summer then
			imgui.SetCursorPosY(20)
			imgui.SetCursorPosX(0)
			imgui.Image(imagesummer, imgui.ImVec2(346, 340), imgui.ImVec2(0,0), imgui.ImVec2(1,1), imgui.ImVec4(1, 1, 1, 0.3))	  
			imgui.SetCursorPosX((imgui.GetWindowWidth() - 270)/2)
			imgui.SetCursorPosY(26)
		end
		if autumn then
			imgui.SetCursorPosY(20)
			imgui.SetCursorPosX(0)
			imgui.Image(imageautumn, imgui.ImVec2(346, 340), imgui.ImVec2(0,0), imgui.ImVec2(1,1), imgui.ImVec4(1, 1, 1, 0.3))	  
			imgui.SetCursorPosX((imgui.GetWindowWidth() - 270)/2)
			imgui.SetCursorPosY(26)
		end
		if winter then
			imgui.SetCursorPosY(20)
			imgui.SetCursorPosX(0)
			imgui.Image(imagewinter, imgui.ImVec2(346, 340), imgui.ImVec2(0,0), imgui.ImVec2(1,1), imgui.ImVec4(1, 1, 1, 0.3))	  
			imgui.SetCursorPosX((imgui.GetWindowWidth() - 270)/2)
			imgui.SetCursorPosY(26)
		end
		if ua then
			imgui.SetCursorPosY(20)
			imgui.SetCursorPosX(0)
			imgui.Image(imageua, imgui.ImVec2(346, 340), imgui.ImVec2(0,0), imgui.ImVec2(1,1), imgui.ImVec4(1, 1, 1, 0.3))	  
			imgui.SetCursorPosX((imgui.GetWindowWidth() - 270)/2)
			imgui.SetCursorPosY(26)
		end
		if mart8 then
			imgui.SetCursorPosY(20)
			imgui.SetCursorPosX(0)
			imgui.Image(imagemart8, imgui.ImVec2(346, 340), imgui.ImVec2(0,0), imgui.ImVec2(1,1), imgui.ImVec4(1, 1, 1, 0.3))	  
			imgui.SetCursorPosX((imgui.GetWindowWidth() - 270)/2)
			imgui.SetCursorPosY(26)
		end
		if fev23 then
			imgui.SetCursorPosY(20)
			imgui.SetCursorPosX(0)
			imgui.Image(imagefev23, imgui.ImVec2(346, 340), imgui.ImVec2(0,0), imgui.ImVec2(1,1), imgui.ImVec4(1, 1, 1, 0.3))	  
			imgui.SetCursorPosX((imgui.GetWindowWidth() - 270)/2)
			imgui.SetCursorPosY(26)
		end
		if fev14 then
			imgui.SetCursorPosY(20)
			imgui.SetCursorPosX(0)
			imgui.Image(imagefev14, imgui.ImVec2(346, 340), imgui.ImVec2(0,0), imgui.ImVec2(1,1), imgui.ImVec4(1, 1, 1, 0.3))	  
			imgui.SetCursorPosX((imgui.GetWindowWidth() - 270)/2)
			imgui.SetCursorPosY(26)
		end
		if dr then
			imgui.SetCursorPosY(20)
			imgui.SetCursorPosX(0)
			imgui.Image(imagedr, imgui.ImVec2(346, 340), imgui.ImVec2(0,0), imgui.ImVec2(1,1), imgui.ImVec4(1, 1, 1, 0.3))	  
			imgui.SetCursorPosX((imgui.GetWindowWidth() - 270)/2)
			imgui.SetCursorPosY(26)
		end
		
			imgui.SetCursorPos(imgui.ImVec2(5,27))
			imgui.PushItemWidth(80)
			if imgui.InputInt(u8'Толщина текста',sizetext) then
				local font = renderCreateFont("Arial", sizetext, 4)
				mainini.settings.sizetext=sizetext.v
				inicfg.save(mainini,directini)
				sre=true
			end
			imgui.SetCursorPosX((5))
			if imgui.InputInt(u8'Толщина трейсера',sizetr) then
				mainini.settings.sizetr=sizetr.v
				inicfg.save(mainini,directini)
			end
			imgui.SetCursorPos(imgui.ImVec2(5,84))
			if imgui.Checkbox(u8'Статистика', stats) then
			imgui.ShowCursor = false
				if stats.v == true then main_window_state3.v=true else main_window_state3.v = false end
				mainini.settings.stats=stats.v
				inicfg.save(mainini,directini)
			end
			imgui.SameLine()
			if imgui.Button(u8'Место1') then 
				rot()
			end
			imgui.SameLine()
			if imgui.Button(u8'Место2') then 
				rot2()
			end
			imgui.SetCursorPos(imgui.ImVec2(5,104))
			if imgui.Checkbox(u8'Не  отображать "0"', nol) then
				mainini.settings.nol=nol.v
				inicfg.save(mainini,directini)
			end
			
			imgui.SetCursorPos(imgui.ImVec2(5,124))
			if imgui.Checkbox(u8'Трейсеры', tres) then
				mainini.settings.tres=tres.v
				inicfg.save(mainini,directini)
			end
			imgui.SameLine()
			if imgui.Checkbox(u8'Дистанция', dis) then
				mainini.settings.dis=dis.v
				inicfg.save(mainini,directini)
			end
			imgui.PushItemWidth(70)
			if imgui.InputText(u8'Команда меню без "/"',cmd) then
				sampUnregisterChatCommand(mainini.settings.cmd)
				sampRegisterChatCommand(cmd.v,cmd_work)
				mainini.settings.cmd=cmd.v
				inicfg.save(mainini,directini)
			end
			for k,v in pairs(hotkeys) do 
					if v.edit then 
						local downKey = getDownKeys()
						maincfg.hotkeys[k] = downKey
						if downKey == '' then
							if os.clock() - v.ticked > 0.5 then
								v.ticked = os.clock()
								v.tickedState = not v.tickedState
							end
							v.name = v.tickedState and "No" or "##isNo "..v.ticked
						else
							v.name = vkeys.key_names[maincfg.hotkeys[k]]
							v.edit = false
							inicfg.save(maincfg, 'aarzhot.ini')
						end
					end
					
					if imgui.Button(u8(tostring(maincfg.hotkeys[k] == nil and "Отсутствует".."##"..k or v.name.."##"..k)), imgui.ImVec2(82, 0)) then
						v.edit = true
					end 
					imgui.SameLine() 
					if k=='nefloppa' then
						if imgui.Checkbox(u8'##333',nickcheck) then
							mainini.settings.nickcheck=nickcheck.v
							inicfg.save(mainini,directini)
						end
						imgui.SameLine()
					end
					if k=='nefloppa2' then
						if imgui.Checkbox(u8'##3233',skeletcheck) then
							mainini.settings.skeletcheck=skeletcheck.v
							inicfg.save(mainini,directini)
						end
					end
					imgui.SameLine()
					imgui.Text(u8(v.sName))
				end


			
			if imgui.Checkbox(u8'Радужный режим', rai) then
				mainini.settings.rai=rai.v
				inicfg.save(mainini,directini)			
			end
				if imgui.SliderInt(u8"Скорость", speeed, 1, 8) then
					mainini.settings.speeed=speeed.v
					inicfg.save(mainini,directini)
					end
				
				imgui.PushItemWidth(-1)
				if imgui.Combo(u8'##163623274442', styleimgui, massivwithstyle)  then
					ng = false
					spr = false
					summer = false
					autumn = false
					winter = false
					ua = false
					mart8 = false
					dr = false
					fev14 = false
					fev23 = false
					if styleimgui.v==0 then STYLEred() end
					if styleimgui.v==1 then STYLEorange() end
					if styleimgui.v==2 then STYLEyelow() end
					if styleimgui.v==3 then darkgreentheme() end
					if styleimgui.v==4 then STYLEblue() end
					if styleimgui.v==5 then STYLEblackblue() end
					if styleimgui.v==6 then STYLEpurple() end
					if styleimgui.v==7 then STYLEblack() end
					if styleimgui.v==8 then STYLEgrey() end
					if styleimgui.v==9 then setLightStyle() end
					if styleimgui.v==10 then STYLEkor() end
					if styleimgui.v==11 then STYLEblsal() end
					if styleimgui.v==12 then CherryTheme() end
					if styleimgui.v==13 then STYLEpink() end
					if styleimgui.v==14 then glamourPink() end
					if styleimgui.v==15 then salat() end
					if styleimgui.v==16 then temnozel() end
					if styleimgui.v==17 then BH_theme() end
					if styleimgui.v==18 then apply_custom_style() end
					if styleimgui.v==19 then ng_style() end
					if styleimgui.v==20 then dr_style() end
					if styleimgui.v==21 then fev14_style() end
					if styleimgui.v==22 then fev23_style() end
					if styleimgui.v==23 then mart8_style() end
					if styleimgui.v==24 then ua_style() end
					if styleimgui.v==25 then winter_style() end
					if styleimgui.v==26 then autumn_style() end
					if styleimgui.v==27 then summer_style() end
					if styleimgui.v==28 then spr_style() end
					mainini.settings.style=styleimgui.v
					inicfg.save(mainini,directini)
				end
				
				

				if imgui.SliderInt("Slider", slider, 10, 100) then
					mainini.settings.slider=slider.v
					inicfg.save(mainini,directini)
					prozr=slider.v/100
					ng = false
					spr = false
					summer = false
					autumn = false
					winter = false
					ua = false
					mart8 = false
					dr = false
					fev14 = false
					fev23 = false
					if styleimgui.v==0 then STYLEred() end
					if styleimgui.v==1 then STYLEorange() end
					if styleimgui.v==2 then STYLEyelow() end
					if styleimgui.v==3 then darkgreentheme() end
					if styleimgui.v==4 then STYLEblue() end
					if styleimgui.v==5 then STYLEblackblue() end
					if styleimgui.v==6 then STYLEpurple() end
					if styleimgui.v==7 then STYLEblack() end
					if styleimgui.v==8 then STYLEgrey() end
					if styleimgui.v==9 then setLightStyle() end
					if styleimgui.v==10 then STYLEkor() end
					if styleimgui.v==11 then STYLEblsal() end
					if styleimgui.v==12 then CherryTheme() end
					if styleimgui.v==13 then STYLEpink() end
					if styleimgui.v==14 then glamourPink() end
					if styleimgui.v==15 then salat() end
					if styleimgui.v==16 then temnozel() end
					if styleimgui.v==17 then BH_theme() end
					if styleimgui.v==18 then apply_custom_style() end
					if styleimgui.v==19 then ng_style() end
					if styleimgui.v==20 then dr_style() end
					if styleimgui.v==21 then fev14_style() end
					if styleimgui.v==22 then fev23_style() end
					if styleimgui.v==23 then mart8_style() end
					if styleimgui.v==24 then ua_style() end
					if styleimgui.v==25 then winter_style() end
					if styleimgui.v==26 then autumn_style() end
					if styleimgui.v==27 then summer_style() end
					if styleimgui.v==28 then spr_style() end
				end
			if imgui.Button(u8'В меню',(imgui.ImVec2(-1,19))) then
				menu = 0
				shirina=365
				visota=215
			end
			imgui.SetCursorPos(imgui.ImVec2(10,317))
imgui.TextQuestion(u8'Прозрачность в %')

		end
	imgui.End()
	
end
	
if main_window_state2.v then
  
  local sw, sh = getScreenResolution()
        imgui.SetNextWindowPos(imgui.ImVec2(sw * 0.9, sh /2), imgui.Cond.FirstUseEver, imgui.ImVec2(0.5, 0.5))	
    imgui.SetNextWindowSize(imgui.ImVec2(110, 218), imgui.Cond.FirstUseEver) -- меняем размер
  imgui.Begin(u8'Граффити', main_window_state2, imgui.WindowFlags.NoResize)
    imgui.ShowCursor = true

			if imgui.Checkbox(u8'Grove', ggrove) then
				mainini.settings.ggrove=ggrove.v
				inicfg.save(mainini,directini)
			end
			if imgui.Checkbox(u8'Ballas', gballas) then
				mainini.settings.gballas=gballas.v
				inicfg.save(mainini,directini)
			end
			if imgui.Checkbox(u8'Vagos', gvagos) then
				mainini.settings.gvagos=gvagos.v
				inicfg.save(mainini,directini)
			end
			if imgui.Checkbox(u8'Rifa', grifa) then
				mainini.settings.grifa=grifa.v
				inicfg.save(mainini,directini)
			end
			if imgui.Checkbox(u8'Aztecas', gaztecas) then
				mainini.settings.gaztecas=gaztecas.v
				inicfg.save(mainini,directini)
			end
			if imgui.Checkbox(u8'Night Wolfs', gwolf) then
				mainini.settings.gwolf=gwolf.v
				inicfg.save(mainini,directini)
			end
			if imgui.Button(u8'Выключить все') then
				ggrove.v = false mainini.settings.ggrove=ggrove.v
				gballas.v = false mainini.settings.gballas=gballas.v
				gvagos.v = false mainini.settings.gvagos=gvagos.v
				grifa.v = false mainini.settings.grifa=grifa.v
				gaztecas.v = false mainini.settings.gaztecas=gaztecas.v
				gwolf.v = false mainini.settings.gwolf=gwolf.v
				inicfg.save(mainini,directini)
			end
			if imgui.Button(u8'Включить все') then
				ggrove.v = true mainini.settings.ggrove=ggrove.v
				gballas.v = true mainini.settings.gballas=gballas.v
				gvagos.v = true mainini.settings.gvagos=gvagos.v
				grifa.v = true mainini.settings.grifa=grifa.v
				gaztecas.v = true mainini.settings.gaztecas=gaztecas.v
				gwolf.v = true mainini.settings.gwolf=gwolf.v
				inicfg.save(mainini,directini)
			end
   imgui.End()
	end
	
	
	statik()
end

function statik()
if main_window_state3.v then
 
		local sw, sh = getScreenResolution()
        imgui.SetNextWindowPos(imgui.ImVec2(rx,ryy))
		local s = imgui.GetWindowSize()		
		--imgui.SetWindowSize(imgui.ImVec2(razz, razz))
		--razz = 23+raz * 17
		--razz = 23+raz * 17
		--imgui.SetNextWindowSize(imgui.ImVec2(110, razz), imgui.Cond.FirstUseEver) -- меняем размер18666
		imgui.SetNextWindowSize(imgui.ImVec2(110, razz))
		if work then
		imgui.Begin(textstats, nil, imgui.WindowFlags.NoResize)
		
		if ng then
			imgui.SetCursorPosY(20)
			imgui.SetCursorPosX(0)
			imgui.Image(image, imgui.ImVec2(110, razz-22), imgui.ImVec2(0,0), imgui.ImVec2(1,1), imgui.ImVec4(1, 1, 1, 0.3))  
			imgui.SetCursorPosX((imgui.GetWindowWidth() - 270)/2)
			imgui.SetCursorPosY(26)
		end
		if spr then
			imgui.SetCursorPosY(20)
			imgui.SetCursorPosX(0)
			imgui.Image(imagespr, imgui.ImVec2(110, razz-22), imgui.ImVec2(0,0), imgui.ImVec2(1,1), imgui.ImVec4(1, 1, 1, 0.3))  
			imgui.SetCursorPosX((imgui.GetWindowWidth() - 270)/2)
			imgui.SetCursorPosY(26)
		end
		if summer then
			imgui.SetCursorPosY(20)
			imgui.SetCursorPosX(0)
			imgui.Image(imagesummer, imgui.ImVec2(110, razz-22), imgui.ImVec2(0,0), imgui.ImVec2(1,1), imgui.ImVec4(1, 1, 1, 0.3))  
			imgui.SetCursorPosX((imgui.GetWindowWidth() - 270)/2)
			imgui.SetCursorPosY(26)
		end
		if autumn then
			imgui.SetCursorPosY(20)
			imgui.SetCursorPosX(0)
			imgui.Image(imageautumn, imgui.ImVec2(110, razz-22), imgui.ImVec2(0,0), imgui.ImVec2(1,1), imgui.ImVec4(1, 1, 1, 0.3))  
			imgui.SetCursorPosX((imgui.GetWindowWidth() - 270)/2)
			imgui.SetCursorPosY(26)
		end
		if winter then
			imgui.SetCursorPosY(20)
			imgui.SetCursorPosX(0)
			imgui.Image(imagewinter, imgui.ImVec2(110, razz-22), imgui.ImVec2(0,0), imgui.ImVec2(1,1), imgui.ImVec4(1, 1, 1, 0.3))  
			imgui.SetCursorPosX((imgui.GetWindowWidth() - 270)/2)
			imgui.SetCursorPosY(26)
		end
		if ua then
			imgui.SetCursorPosY(20)
			imgui.SetCursorPosX(0)
			imgui.Image(imageua, imgui.ImVec2(110, razz-22), imgui.ImVec2(0,0), imgui.ImVec2(1,1), imgui.ImVec4(1, 1, 1, 0.3))  
			imgui.SetCursorPosX((imgui.GetWindowWidth() - 270)/2)
			imgui.SetCursorPosY(26)
		end
		if mart8 then
			imgui.SetCursorPosY(20)
			imgui.SetCursorPosX(0)
			imgui.Image(imagemart8, imgui.ImVec2(110, razz-22), imgui.ImVec2(0,0), imgui.ImVec2(1,1), imgui.ImVec4(1, 1, 1, 0.3))  
			imgui.SetCursorPosX((imgui.GetWindowWidth() - 270)/2)
			imgui.SetCursorPosY(26)
		end
		if fev23 then
			imgui.SetCursorPosY(20)
			imgui.SetCursorPosX(0)
			imgui.Image(imagefev23, imgui.ImVec2(110, razz-22), imgui.ImVec2(0,0), imgui.ImVec2(1,1), imgui.ImVec4(1, 1, 1, 0.3))  
			imgui.SetCursorPosX((imgui.GetWindowWidth() - 270)/2)
			imgui.SetCursorPosY(26)
		end
		if fev14 then
			imgui.SetCursorPosY(20)
			imgui.SetCursorPosX(0)
			imgui.Image(imagefev14, imgui.ImVec2(110, razz-22), imgui.ImVec2(0,0), imgui.ImVec2(1,1), imgui.ImVec4(1, 1, 1, 0.3))  
			imgui.SetCursorPosX((imgui.GetWindowWidth() - 270)/2)
			imgui.SetCursorPosY(26)
		end
		if dr then
			imgui.SetCursorPosY(20)
			imgui.SetCursorPosX(0)
			imgui.Image(imagedr, imgui.ImVec2(110, razz-22), imgui.ImVec2(0,0), imgui.ImVec2(1,1), imgui.ImVec4(1, 1, 1, 0.3))  
			imgui.SetCursorPosX((imgui.GetWindowWidth() - 270)/2)
			imgui.SetCursorPosY(26)
		end
   if not main_window_state.v and not main_window_state2.v  then imgui.ShowCursor = false end
		if (nol.v==true)and(olenk~=0) then if olen.v then imgui.CenterText(u8'Олени: '..olenk) end end if (nol.v==false) then if olen.v then imgui.CenterText(u8'Олени: '..olenk) end end

		if (nol.v==true)and(graffitik~=0) then if graffiti.v then imgui.CenterText(u8'Граффити: '..graffitik) end end if (nol.v==false) then if graffiti.v then imgui.CenterText(u8'Граффити: '..graffitik) end end
		if (nol.v==true)and(narkok~=0) then if narko.v then imgui.CenterText(u8'Закладки: '..narkok) end end if (nol.v==false) then if narko.v then imgui.CenterText(u8'Закладки: '..narkok) end end
		if (nol.v==true)and(podarokk~=0) then if podarok.v then imgui.CenterText(u8'Рванка: '..podarokk) end end if (nol.v==false) then if podarok.v then imgui.CenterText(u8'Рванка: '..podarokk) end end
		--if (nol.v==true)and(odejdak~=0) then if odejda.v then imgui.CenterText(u8'Одежда: '..odejdak) end end if (nol.v==false) then if odejda.v then imgui.CenterText(u8'Одежда: '..odejdak) end end
		if (nol.v==true)and(rydak~=0) then if ryda.v then imgui.CenterText(u8'Руды: '..rydak) end end if (nol.v==false) then if ryda.v then imgui.CenterText(u8'Руды: '..rydak) end end
		if (nol.v==true)and(kladk~=0) then if klad.v then imgui.CenterText(u8'Клады: '..kladk) end end if (nol.v==false) then if klad.v then imgui.CenterText(u8'Клады: '..kladk) end end
		if (nol.v==true)and(gunk~=0) then if gun.v then imgui.CenterText(u8'Оружие: '..gunk) end end if (nol.v==false) then if gun.v then imgui.CenterText(u8'Оружие: '..gunk) end end
		if (nol.v==true)and(semenak~=0) then if semena.v then imgui.CenterText(u8'Семена: '..semenak) end end if (nol.v==false) then if semena.v then imgui.CenterText(u8'Семена: '..semenak) end end
		if (nol.v==true)and(lennk~=0) then if lenn.v then imgui.CenterText(u8'Лён: '..lennk) end end if (nol.v==false) then if lenn.v then imgui.CenterText(u8'Лён: '..lennk) end end
		if (nol.v==true)and(hlopokk~=0) then if hlopok.v then imgui.CenterText(u8'Хлопок: '..hlopokk) end end if (nol.v==false) then if hlopok.v then imgui.CenterText(u8'Хлопок: '..hlopokk) end end
		imgui.End()
		end
	end
	end

function imgui.TextQuestion(text)  -- аналогично прошлому
    imgui.TextDisabled('(?)')
    if imgui.IsItemHovered() then
        imgui.BeginTooltip()
        imgui.PushTextWrapPos(450)
        imgui.TextUnformatted(text)
        imgui.PopTextWrapPos()
        imgui.EndTooltip()
    end
end
function rot()--изменение расположение окна
rotate = true
imgui.ShowCursor = false
main_window_state.v = false
main_window_state2.v = false
sampAddChatMessage('Передвиньте статистику, а когда найдете нужно место - нажмите на ентер',-1)
end
function rot2()--изменение расположение окна
rotate2 = true
imgui.ShowCursor = false
main_window_state.v = false
main_window_state2.v = false
sampAddChatMessage('Передвиньте статистику, а когда найдете нужно место - нажмите на ентер',-1)
end

function imgui.VerticalSeparator()
    local p = imgui.GetCursorScreenPos()
    imgui.GetWindowDrawList():AddLine(imgui.ImVec2(p.x, p.y), imgui.ImVec2(p.x, p.y + imgui.GetContentRegionMax().y), imgui.GetColorU32(imgui.GetStyle().Colors[imgui.Col.Separator]))
end


function sampev.onSetObjectMaterial(id, data)
	local object, bool = sampGetObjectHandleBySampId(id), true
	if doesObjectExist(object) and getObjectModel(object) == 3930 then
		if textures[data.textureName] then
			local _, x, y, z = getObjectCoordinates(object)
			for k, v in pairs(resources) do
				local _, ox, oy, oz = getObjectCoordinates(sampGetObjectHandleBySampId(k))
				if getDistanceBetweenCoords3d(x, y, z, ox, oy, oz) < 1 then
					bool = false
					if textures[data.textureName] > v then
						resources[k], bool = nil, true
						break
					end
				end
			end
			if bool then
				resources[id] = textures[data.textureName]
			end
		end
	end
end

function explode_U32(u32)
	local a = bit.band(bit.rshift(u32, 24), 0xFF)
	local r = bit.band(bit.rshift(u32, 16), 0xFF)
	local g = bit.band(bit.rshift(u32, 8), 0xFF)
	local b = bit.band(u32, 0xFF)
	return a, r, g, b
end

function changeColorAlpha(argb, alpha)
	local _, r, g, b = explode_U32(argb)
	return join_argb(alpha, r, g, b)
end

function sampev.onDestroyObject(id)
	if resources[id] then
		resources[id] = nil
	end
end

function sampev.onCreate3DText(id, color, position, dist, testLOS, player, vehicle, text)
	if text:find('Месторождение') then
		textsTable[id] = position
	end
end

function sampev.onRemove3DTextLabel(id)
	if textsTable[id] then
		textsTable[id] = nil
	end
end



function sampev.onSendPlayerSync(data)
	if autodig then
		a = a + 1
		if a == 3 then
			local p = data.position
			for k, v in pairs(textsTable) do
				if getDistanceBetweenCoords3d(p.x, p.y, p.z, v.x, v.y, v.z) < 2.5 then
					data.keysData = 1024
					break
				end
			end 
			a = 0
		end
	end
end
function getBodyPartCoordinates(id, handle)
  local pedptr = getCharPointer(handle)
  local vec = ffi.new("float[3]")
  getBonePosition(ffi.cast("void*", pedptr), vec, id, true)
  return vec[0], vec[1], vec[2]
end

function imgui.TextColoredRGB(string)
    local style = imgui.GetStyle()
    local colors = style.Colors
    local clr = imgui.Col

    local function color_imvec4(color)
        if color:upper() == 'SSSSSS' then return colors[clr.Text] end
        local color = type(color) == 'number' and ('%X'):format(color):upper() or color:upper()
        local rgb = {}
        for i = 1, #color/2 do rgb[#rgb+1] = tonumber(color:sub(2*i-1, 2*i), 16) end
        return imgui.ImVec4(rgb[1]/255, rgb[2]/255, rgb[3]/255, rgb[4] and rgb[4]/255 or colors[clr.Text].w)
    end

    local function render_text(string)
        local text, color = {}, {}
        local m = 1
        while string:find('{......}') do
            local n, k = string:find('{......}')
            text[#text], text[#text+1] = string:sub(m, n-1), string:sub(k+1, #string)
            color[#color+1] = color_imvec4(string:sub(n+1, k-1))
            local t1, t2 = string:sub(1, n-1), string:sub(k+1, #string)
            string = t1..t2
            m = k-7
        end
        if text[0] then
            for i, _ in ipairs(text) do
                imgui.TextColored(color[i] or colors[clr.Text], u8(text[i]))
                imgui.SameLine(nil, 0)
            end
            imgui.NewLine()
        else imgui.Text(u8(string)) end
    end

    render_text(string)
end

function darkgreentheme()
    imgui.SwitchContext()
    local style = imgui.GetStyle()
    local colors = style.Colors
    local clr = imgui.Col
    local ImVec4 = imgui.ImVec4
    
    colors[clr.Text]                   = ImVec4(0.90, 0.90, 0.90, prozr)
    colors[clr.TextDisabled]                   = ImVec4(0.90, 0.90, 0.90, prozr)
    colors[clr.TextDisabled]           = ImVec4(0.60, 0.60, 0.60, 1.00)
    colors[clr.WindowBg]               = ImVec4(0.08, 0.08, 0.08, prozr)
    colors[clr.ChildWindowBg]          = ImVec4(0.10, 0.10, 0.10, 1.00)
    colors[clr.PopupBg]                = ImVec4(0.08, 0.08, 0.08, 1.00)
    colors[clr.Border]                 = ImVec4(0.70, 0.70, 0.70, 0.40)
    colors[clr.BorderShadow]           = ImVec4(0.00, 0.00, 0.00, 0.00)
    colors[clr.FrameBg]                = ImVec4(0.15, 0.15, 0.15, 1.00)
    colors[clr.FrameBgHovered]         = ImVec4(0.19, 0.19, 0.19, 0.71)
    colors[clr.FrameBgActive]          = ImVec4(0.34, 0.34, 0.34, 0.79)
    colors[clr.TitleBg]                = ImVec4(0.00, 0.69, 0.33, prozr)
    colors[clr.TitleBgActive]          = ImVec4(0.00, 0.74, 0.36, prozr)
    colors[clr.TitleBgCollapsed]       = ImVec4(0.00, 0.69, 0.33, 0.50)
    colors[clr.MenuBarBg]              = ImVec4(0.00, 0.80, 0.38, 1.00)
    colors[clr.ScrollbarBg]            = ImVec4(0.16, 0.16, 0.16, 1.00)
    colors[clr.ScrollbarGrab]          = ImVec4(0.00, 0.69, 0.33, 1.00)
    colors[clr.ScrollbarGrabHovered]   = ImVec4(0.00, 0.82, 0.39, 1.00)
    colors[clr.ScrollbarGrabActive]    = ImVec4(0.00, 1.00, 0.48, 1.00)
    colors[clr.ComboBg]                = ImVec4(0.20, 0.20, 0.20, 0.99)
    colors[clr.CheckMark]              = ImVec4(0.00, 0.69, 0.33, 1.00)
    colors[clr.SliderGrab]             = ImVec4(0.00, 0.69, 0.33, 1.00)
    colors[clr.SliderGrabActive]       = ImVec4(0.00, 0.77, 0.37, 1.00)
    colors[clr.Button]                 = ImVec4(0.00, 0.69, 0.33, 1.00)
    colors[clr.ButtonHovered]          = ImVec4(0.00, 0.82, 0.39, 1.00)
    colors[clr.ButtonActive]           = ImVec4(0.00, 0.87, 0.42, 1.00)
    colors[clr.Header]                 = ImVec4(0.00, 0.69, 0.33, 1.00)
    colors[clr.HeaderHovered]          = ImVec4(0.00, 0.76, 0.37, 0.57)
    colors[clr.HeaderActive]           = ImVec4(0.00, 0.88, 0.42, 0.89)
    colors[clr.Separator]              = ImVec4(1.00, 1.00, 1.00, 0.40)
    colors[clr.SeparatorHovered]       = ImVec4(1.00, 1.00, 1.00, 0.60)
    colors[clr.SeparatorActive]        = ImVec4(1.00, 1.00, 1.00, 0.80)
    colors[clr.ResizeGrip]             = ImVec4(0.00, 0.69, 0.33, 1.00)
    colors[clr.ResizeGripHovered]      = ImVec4(0.00, 0.76, 0.37, 1.00)
    colors[clr.ResizeGripActive]       = ImVec4(0.00, 0.86, 0.41, 1.00)
    colors[clr.CloseButton]            = ImVec4(0.00, 0.82, 0.39, 1.00)
    colors[clr.CloseButtonHovered]     = ImVec4(0.00, 0.88, 0.42, 1.00)
    colors[clr.CloseButtonActive]      = ImVec4(0.00, 1.00, 0.48, 1.00)
    colors[clr.PlotLines]              = ImVec4(0.00, 0.69, 0.33, 1.00)
    colors[clr.PlotLinesHovered]       = ImVec4(0.00, 0.74, 0.36, 1.00)
    colors[clr.PlotHistogram]          = ImVec4(0.00, 0.69, 0.33, 1.00)
    colors[clr.PlotHistogramHovered]   = ImVec4(0.00, 0.80, 0.38, 1.00)
    colors[clr.TextSelectedBg]         = ImVec4(0.00, 0.69, 0.33, 0.72)
    colors[clr.ModalWindowDarkening]   = ImVec4(0.17, 0.17, 0.17, 0.48)
	text= 'Arizona Render by Stenford v2.'..thisScript().version
	textstats= ((u8(' Статистика')))
end

function STYLEpurple()
    imgui.SwitchContext()
    local style = imgui.GetStyle()
    local colors = style.Colors
    local clr = imgui.Col
    local ImVec4 = imgui.ImVec4
   colors[clr.Text]                   = ImVec4(1.00, 1.00, 1.00, prozr)
   colors[clr.TextDisabled]                   = ImVec4(1.00, 1.00, 1.00, prozr)
    colors[clr.WindowBg]              = ImVec4(0.14, 0.12, 0.16, prozr);
    colors[clr.ChildWindowBg]         = ImVec4(0.30, 0.20, 0.39, 0.00);
    colors[clr.PopupBg]               = ImVec4(0.05, 0.05, 0.10, 0.90);
    colors[clr.Border]                = ImVec4(0.89, 0.85, 0.92, 0.30);
    colors[clr.BorderShadow]          = ImVec4(0.00, 0.00, 0.00, 0.00);
    colors[clr.FrameBg]               = ImVec4(0.30, 0.20, 0.39, 1.00);
    colors[clr.FrameBgHovered]        = ImVec4(0.41, 0.19, 0.63, 0.68);
    colors[clr.FrameBgActive]         = ImVec4(0.41, 0.19, 0.63, 1.00);
    colors[clr.TitleBg]               = ImVec4(0.41, 0.19, 0.63, prozr);
    colors[clr.TitleBgCollapsed]      = ImVec4(0.41, 0.19, 0.63, 0.35);
    colors[clr.TitleBgActive]         = ImVec4(0.41, 0.19, 0.63, prozr);
    colors[clr.MenuBarBg]             = ImVec4(0.30, 0.20, 0.39, 0.57);
    colors[clr.ScrollbarBg]           = ImVec4(0.30, 0.20, 0.39, 1.00);
    colors[clr.ScrollbarGrab]         = ImVec4(0.41, 0.19, 0.63, 0.31);
    colors[clr.ScrollbarGrabHovered]  = ImVec4(0.41, 0.19, 0.63, 0.78);
    colors[clr.ScrollbarGrabActive]   = ImVec4(0.41, 0.19, 0.63, 1.00);
    colors[clr.ComboBg]               = ImVec4(0.30, 0.20, 0.39, 1.00);
    colors[clr.CheckMark]             = ImVec4(0.56, 0.61, 1.00, 1.00);
    colors[clr.SliderGrab]            = ImVec4(0.41, 0.19, 0.63, 0.24);
    colors[clr.SliderGrabActive]      = ImVec4(0.41, 0.19, 0.63, 1.00);
    colors[clr.Button]                = ImVec4(0.41, 0.19, 0.63, 0.44);
    colors[clr.ButtonHovered]         = ImVec4(0.41, 0.19, 0.63, 0.86);
    colors[clr.ButtonActive]          = ImVec4(0.64, 0.33, 0.94, 1.00);
    colors[clr.Header]                = ImVec4(0.41, 0.19, 0.63, 0.76);
    colors[clr.HeaderHovered]         = ImVec4(0.41, 0.19, 0.63, 0.86);
    colors[clr.HeaderActive]          = ImVec4(0.41, 0.19, 0.63, 1.00);
    colors[clr.ResizeGrip]            = ImVec4(0.41, 0.19, 0.63, 0.20);
    colors[clr.ResizeGripHovered]     = ImVec4(0.41, 0.19, 0.63, 0.78);
    colors[clr.ResizeGripActive]      = ImVec4(0.41, 0.19, 0.63, 1.00);
    colors[clr.CloseButton]           = ImVec4(1.00, 1.00, 1.00, 0.75);
    colors[clr.CloseButtonHovered]    = ImVec4(0.88, 0.74, 1.00, 0.59);
    colors[clr.CloseButtonActive]     = ImVec4(0.88, 0.85, 0.92, 1.00);
    colors[clr.PlotLines]             = ImVec4(0.89, 0.85, 0.92, 0.63);
    colors[clr.PlotLinesHovered]      = ImVec4(0.41, 0.19, 0.63, 1.00);
    colors[clr.PlotHistogram]         = ImVec4(0.89, 0.85, 0.92, 0.63);
    colors[clr.PlotHistogramHovered]  = ImVec4(0.41, 0.19, 0.63, 1.00);
    colors[clr.TextSelectedBg]        = ImVec4(0.41, 0.19, 0.63, 0.43);
    colors[clr.ModalWindowDarkening]  = ImVec4(0.20, 0.20, 0.20, 0.35);
	text= 'Arizona Render by Stenford v2.'..thisScript().version
	textstats= ((u8(' Статистика')))
end
 

function STYLEblackblue()
    imgui.SwitchContext()
    local style = imgui.GetStyle()
    local colors = style.Colors
    local clr = imgui.Col
    local ImVec4 = imgui.ImVec4

  

    colors[clr.FrameBg]                = ImVec4(0.16, 0.29, 0.48, 0.54)
    colors[clr.FrameBgHovered]         = ImVec4(0.26, 0.59, 0.98, 0.40)
    colors[clr.FrameBgActive]          = ImVec4(0.26, 0.59, 0.98, 0.67)
    colors[clr.TitleBg]                = ImVec4(0.04, 0.04, 0.04, prozr)
    colors[clr.TitleBgActive]          = ImVec4(0.16, 0.29, 0.48, prozr)
    colors[clr.TitleBgCollapsed]       = ImVec4(0.00, 0.00, 0.00, 0.51)
    colors[clr.CheckMark]              = ImVec4(0.26, 0.59, 0.98, 1.00)
    colors[clr.SliderGrab]             = ImVec4(0.24, 0.52, 0.88, 1.00)
    colors[clr.SliderGrabActive]       = ImVec4(0.26, 0.59, 0.98, 1.00)
    colors[clr.Button]                 = ImVec4(0.26, 0.59, 0.98, 0.40)
    colors[clr.ButtonHovered]          = ImVec4(0.26, 0.59, 0.98, 1.00)
    colors[clr.ButtonActive]           = ImVec4(0.06, 0.53, 0.98, 1.00)
    colors[clr.Header]                 = ImVec4(0.26, 0.59, 0.98, 0.31)
    colors[clr.HeaderHovered]          = ImVec4(0.26, 0.59, 0.98, 0.80)
    colors[clr.HeaderActive]           = ImVec4(0.26, 0.59, 0.98, 1.00)
    colors[clr.Separator]              = colors[clr.Border]
    colors[clr.SeparatorHovered]       = ImVec4(0.26, 0.59, 0.98, 0.78)
    colors[clr.SeparatorActive]        = ImVec4(0.26, 0.59, 0.98, 1.00)
    colors[clr.ResizeGrip]             = ImVec4(0.26, 0.59, 0.98, 0.25)
    colors[clr.ResizeGripHovered]      = ImVec4(0.26, 0.59, 0.98, 0.67)
    colors[clr.ResizeGripActive]       = ImVec4(0.26, 0.59, 0.98, 0.95)
    colors[clr.TextSelectedBg]         = ImVec4(0.26, 0.59, 0.98, 0.35)
    colors[clr.Text]                   = ImVec4(1.00, 1.00, 1.00, prozr)
    colors[clr.TextDisabled]                   = ImVec4(1.00, 1.00, 1.00, prozr) 
    colors[clr.WindowBg]               = ImVec4(0.06, 0.06, 0.06, prozr)
    colors[clr.ChildWindowBg]          = ImVec4(1.00, 1.00, 1.00, 0.00)
    colors[clr.PopupBg]                = ImVec4(0.08, 0.08, 0.08, 0.94)
    colors[clr.ComboBg]                = colors[clr.PopupBg]
    colors[clr.Border]                 = ImVec4(0.43, 0.43, 0.50, 0.50)
    colors[clr.BorderShadow]           = ImVec4(0.00, 0.00, 0.00, 0.00)
    colors[clr.MenuBarBg]              = ImVec4(0.14, 0.14, 0.14, 1.00)
    colors[clr.ScrollbarBg]            = ImVec4(0.02, 0.02, 0.02, 0.53)
    colors[clr.ScrollbarGrab]          = ImVec4(0.31, 0.31, 0.31, 1.00)
    colors[clr.ScrollbarGrabHovered]   = ImVec4(0.41, 0.41, 0.41, 1.00)
    colors[clr.ScrollbarGrabActive]    = ImVec4(0.51, 0.51, 0.51, 1.00)
    colors[clr.CloseButton]            = ImVec4(0.41, 0.41, 0.41, 0.50)
    colors[clr.CloseButtonHovered]     = ImVec4(0.98, 0.39, 0.36, 1.00)
    colors[clr.CloseButtonActive]      = ImVec4(0.98, 0.39, 0.36, 1.00)
    colors[clr.PlotLines]              = ImVec4(0.61, 0.61, 0.61, 1.00)
    colors[clr.PlotLinesHovered]       = ImVec4(1.00, 0.43, 0.35, 1.00)
    colors[clr.PlotHistogram]          = ImVec4(0.90, 0.70, 0.00, 1.00)
    colors[clr.PlotHistogramHovered]   = ImVec4(1.00, 0.60, 0.00, 1.00)
    colors[clr.ModalWindowDarkening]   = ImVec4(0.80, 0.80, 0.80, 0.35)
	text= 'Arizona Render by Stenford v2.'..thisScript().version
	textstats= ((u8(' Статистика')))
end

function STYLEred()
    imgui.SwitchContext()
    local style = imgui.GetStyle()
    local colors = style.Colors
    local clr = imgui.Col
    local ImVec4 = imgui.ImVec4

 
    colors[clr.FrameBg]                = ImVec4(0.48, 0.16, 0.16, 0.54)
    colors[clr.FrameBgHovered]         = ImVec4(0.98, 0.26, 0.26, 0.40)
    colors[clr.FrameBgActive]          = ImVec4(0.98, 0.26, 0.26, 0.67)
    colors[clr.TitleBg]                = ImVec4(0.04, 0.04, 0.04, prozr)
    colors[clr.TitleBgActive]          = ImVec4(0.48, 0.16, 0.16, prozr)
    colors[clr.TitleBgCollapsed]       = ImVec4(0.00, 0.00, 0.00, 0.51)
    colors[clr.CheckMark]              = ImVec4(0.98, 0.26, 0.26, 1.00)
    colors[clr.SliderGrab]             = ImVec4(0.88, 0.26, 0.24, 1.00)
    colors[clr.SliderGrabActive]       = ImVec4(0.98, 0.26, 0.26, 1.00)
    colors[clr.Button]                 = ImVec4(0.98, 0.26, 0.26, 0.40)
    colors[clr.ButtonHovered]          = ImVec4(0.98, 0.26, 0.26, 1.00)
    colors[clr.ButtonActive]           = ImVec4(0.98, 0.06, 0.06, 1.00)
    colors[clr.Header]                 = ImVec4(0.98, 0.26, 0.26, 0.31)
    colors[clr.HeaderHovered]          = ImVec4(0.98, 0.26, 0.26, 0.80)
    colors[clr.HeaderActive]           = ImVec4(0.98, 0.26, 0.26, 1.00)
    colors[clr.Separator]              = colors[clr.Border]
    colors[clr.SeparatorHovered]       = ImVec4(0.75, 0.10, 0.10, 0.78)
    colors[clr.SeparatorActive]        = ImVec4(0.75, 0.10, 0.10, 1.00)
    colors[clr.ResizeGrip]             = ImVec4(0.98, 0.26, 0.26, 0.25)
    colors[clr.ResizeGripHovered]      = ImVec4(0.98, 0.26, 0.26, 0.67)
    colors[clr.ResizeGripActive]       = ImVec4(0.98, 0.26, 0.26, 0.95)
    colors[clr.TextSelectedBg]         = ImVec4(0.98, 0.26, 0.26, 0.35)
    colors[clr.Text]                   = ImVec4(1.00, 1.00, 1.00, prozr)
    colors[clr.TextDisabled]                   = ImVec4(1.00, 1.00, 1.00, prozr) 
    colors[clr.WindowBg]               = ImVec4(0.06, 0.06, 0.06, prozr)
    colors[clr.ChildWindowBg]          = ImVec4(1.00, 1.00, 1.00, 0.00)
    colors[clr.PopupBg]                = ImVec4(0.08, 0.08, 0.08, 0.94)
    colors[clr.ComboBg]                = colors[clr.PopupBg]
    colors[clr.Border]                 = ImVec4(0.43, 0.43, 0.50, 0.50)
    colors[clr.BorderShadow]           = ImVec4(0.00, 0.00, 0.00, 0.00)
    colors[clr.MenuBarBg]              = ImVec4(0.14, 0.14, 0.14, 1.00)
    colors[clr.ScrollbarBg]            = ImVec4(0.02, 0.02, 0.02, 0.53)
    colors[clr.ScrollbarGrab]          = ImVec4(0.31, 0.31, 0.31, 1.00)
    colors[clr.ScrollbarGrabHovered]   = ImVec4(0.41, 0.41, 0.41, 1.00)
    colors[clr.ScrollbarGrabActive]    = ImVec4(0.51, 0.51, 0.51, 1.00)
    colors[clr.CloseButton]            = ImVec4(0.41, 0.41, 0.41, 0.50)
    colors[clr.CloseButtonHovered]     = ImVec4(0.98, 0.39, 0.36, 1.00)
    colors[clr.CloseButtonActive]      = ImVec4(0.98, 0.39, 0.36, 1.00)
    colors[clr.PlotLines]              = ImVec4(0.61, 0.61, 0.61, 1.00)
    colors[clr.PlotLinesHovered]       = ImVec4(1.00, 0.43, 0.35, 1.00)
    colors[clr.PlotHistogram]          = ImVec4(0.90, 0.70, 0.00, 1.00)
    colors[clr.PlotHistogramHovered]   = ImVec4(1.00, 0.60, 0.00, 1.00)
    colors[clr.ModalWindowDarkening]   = ImVec4(0.80, 0.80, 0.80, 0.35)
	text= 'Arizona Render by Stenford v2.'..thisScript().version
	textstats= ((u8(' Статистика')))
end

function STYLEorange()
   imgui.SwitchContext()
local style = imgui.GetStyle()
local colors = style.Colors
local clr = imgui.Col
local ImVec4 = imgui.ImVec4
local ImVec2 = imgui.ImVec2

 

colors[clr.Text] = ImVec4(0.80, 0.80, 0.83, prozr)
colors[clr.TextDisabled] = ImVec4(0.80, 0.80, 0.83, prozr) 
colors[clr.WindowBg] = ImVec4(0.06, 0.05, 0.07, prozr)
colors[clr.ChildWindowBg] = ImVec4(0.07, 0.07, 0.09, 1.00)
colors[clr.PopupBg] = ImVec4(0.07, 0.07, 0.09, 1.00)
colors[clr.Border] = ImVec4(0.80, 0.80, 0.83, 0.88)
colors[clr.BorderShadow] = ImVec4(0.92, 0.91, 0.88, 0.00)
colors[clr.FrameBg] = ImVec4(0.10, 0.09, 0.12, 1.00)
colors[clr.FrameBgHovered] = ImVec4(0.24, 0.23, 0.29, 1.00)
colors[clr.FrameBgActive] = ImVec4(0.56, 0.56, 0.58, 1.00)
colors[clr.TitleBg] = ImVec4(0.76, 0.31, 0.00, prozr)
colors[clr.TitleBgCollapsed] = ImVec4(1.00, 0.98, 0.95, 0.75)
colors[clr.TitleBgActive] = ImVec4(0.80, 0.33, 0.00, prozr)
colors[clr.MenuBarBg] = ImVec4(0.10, 0.09, 0.12, 1.00)
colors[clr.ScrollbarBg] = ImVec4(0.10, 0.09, 0.12, 1.00)
colors[clr.ScrollbarGrab] = ImVec4(0.80, 0.80, 0.83, 0.31)
colors[clr.ScrollbarGrabHovered] = ImVec4(0.56, 0.56, 0.58, 1.00)
colors[clr.ScrollbarGrabActive] = ImVec4(0.06, 0.05, 0.07, 1.00)
colors[clr.ComboBg] = ImVec4(0.19, 0.18, 0.21, 1.00)
colors[clr.CheckMark] = ImVec4(1.00, 0.42, 0.00, 0.53)
colors[clr.SliderGrab] = ImVec4(1.00, 0.42, 0.00, 0.53)
colors[clr.SliderGrabActive] = ImVec4(1.00, 0.42, 0.00, 1.00)
colors[clr.Button] = ImVec4(0.10, 0.09, 0.12, 1.00)
colors[clr.ButtonHovered] = ImVec4(0.24, 0.23, 0.29, 1.00)
colors[clr.ButtonActive] = ImVec4(0.56, 0.56, 0.58, 1.00)
colors[clr.Header] = ImVec4(0.10, 0.09, 0.12, 1.00)
colors[clr.HeaderHovered] = ImVec4(0.56, 0.56, 0.58, 1.00)
colors[clr.HeaderActive] = ImVec4(0.06, 0.05, 0.07, 1.00)
colors[clr.ResizeGrip] = ImVec4(0.00, 0.00, 0.00, 0.00)
colors[clr.ResizeGripHovered] = ImVec4(0.56, 0.56, 0.58, 1.00)
colors[clr.ResizeGripActive] = ImVec4(0.06, 0.05, 0.07, 1.00)
colors[clr.CloseButton] = ImVec4(0.40, 0.39, 0.38, 0.16)
colors[clr.CloseButtonHovered] = ImVec4(0.40, 0.39, 0.38, 0.39)
colors[clr.CloseButtonActive] = ImVec4(0.40, 0.39, 0.38, 1.00)
colors[clr.PlotLines] = ImVec4(0.40, 0.39, 0.38, 0.63)
colors[clr.PlotLinesHovered] = ImVec4(0.25, 1.00, 0.00, 1.00)
colors[clr.PlotHistogram] = ImVec4(0.40, 0.39, 0.38, 0.63)
colors[clr.PlotHistogramHovered] = ImVec4(0.25, 1.00, 0.00, 1.00)
colors[clr.TextSelectedBg] = ImVec4(0.25, 1.00, 0.00, 0.43)
colors[clr.ModalWindowDarkening] = ImVec4(1.00, 0.98, 0.95, 0.73)
text= 'Arizona Render by Stenford v2.'..thisScript().version
	textstats= ((u8(' Статистика')))
end 

function STYLEyelow()

    imgui.SwitchContext()
    local style  = imgui.GetStyle()
    local colors = style.Colors
    local clr    = imgui.Col
    local ImVec4 = imgui.ImVec4
    colors[clr.FrameBg]                = ImVec4(0.76, 0.6, 0, 0.74)--
    colors[clr.FrameBgHovered]         = ImVec4(0.84, 0.68, 0, 0.83)--
    colors[clr.FrameBgActive]          = ImVec4(0.92, 0.77, 0, 0.87)--
    colors[clr.TitleBg]                = ImVec4(0.04, 0.04, 0.04, prozr)--
    colors[clr.TitleBgActive]          = ImVec4(0.92, 0.77, 0, prozr)--
    colors[clr.TitleBgCollapsed]       = ImVec4(0.00, 0.00, 0.00, 0.51)--
    colors[clr.CheckMark]              = ImVec4(1.00, 1.00, 1.00, 1.00)
    colors[clr.SliderGrab]             = ImVec4(0.84, 0.68, 0, 1.00)
    colors[clr.SliderGrabActive]       = ImVec4(0.92, 0.77, 0, 1.00)
    colors[clr.Button]                 = ImVec4(0.76, 0.6, 0, 0.85)
    colors[clr.ButtonHovered]          = ImVec4(0.84, 0.68, 0, 1.00)
    colors[clr.ButtonActive]           = ImVec4(0.92, 0.77, 0, 1.00)
    colors[clr.Header]                 = ImVec4(0.84, 0.68, 0, 0.75)
    colors[clr.HeaderHovered]          = ImVec4(0.84, 0.68, 0, 0.90)
    colors[clr.HeaderActive]           = ImVec4(0.92, 0.77, 0, 1.00)
    colors[clr.Separator]              = colors[clr.Border]
    colors[clr.SeparatorHovered]       = ImVec4(0.84, 0.68, 0, 0.78)
    colors[clr.SeparatorActive]        = ImVec4(0.84, 0.68, 0, 1.00)
    colors[clr.ResizeGrip]             = ImVec4(0.76, 0.6, 0, 0.25)
    colors[clr.ResizeGripHovered]      = ImVec4(0.84, 0.68, 0, 0.67)
    colors[clr.ResizeGripActive]       = ImVec4(0.92, 0.77, 0, 0.95)
    colors[clr.TextSelectedBg]         = ImVec4(0.52, 0.34, 0, 0.85)
    colors[clr.Text]                   = ImVec4(1.00, 1.00, 1.00, prozr)
    colors[clr.TextDisabled]                   = ImVec4(1.00, 1.00, 1.00, prozr) 
    colors[clr.WindowBg]               = ImVec4(0.06, 0.06, 0.06, prozr)
    colors[clr.ChildWindowBg]          = ImVec4(1.00, 1.00, 1.00, 0.00)
    colors[clr.PopupBg]                = ImVec4(0.08, 0.08, 0.08, 0.94)
    colors[clr.ComboBg]                = colors[clr.PopupBg]
    colors[clr.Border]                 = ImVec4(0.43, 0.43, 0.50, 0.50)
    colors[clr.BorderShadow]           = ImVec4(0.00, 0.00, 0.00, 0.00)
    colors[clr.MenuBarBg]              = ImVec4(0.14, 0.14, 0.14, 1.00)
    colors[clr.ScrollbarBg]            = ImVec4(0.02, 0.02, 0.02, 0.53)
    colors[clr.ScrollbarGrab]          = ImVec4(0.31, 0.31, 0.31, 1.00)
    colors[clr.ScrollbarGrabHovered]   = ImVec4(0.41, 0.41, 0.41, 1.00)
    colors[clr.ScrollbarGrabActive]    = ImVec4(0.51, 0.51, 0.51, 1.00)
    colors[clr.CloseButton]            = ImVec4(0.41, 0.41, 0.41, 0.50)
    colors[clr.CloseButtonHovered]     = ImVec4(0.98, 0.39, 0.36, 1.00)
    colors[clr.CloseButtonActive]      = ImVec4(0.98, 0.39, 0.36, 1.00)
    colors[clr.PlotLines]              = ImVec4(0.61, 0.61, 0.61, 1.00)
    colors[clr.PlotLinesHovered]       = ImVec4(1.00, 0.43, 0.35, 1.00)
    colors[clr.PlotHistogram]          = ImVec4(0.90, 0.70, 0.00, 1.00)
    colors[clr.PlotHistogramHovered]   = ImVec4(1.00, 0.60, 0.00, 1.00)
    colors[clr.ModalWindowDarkening]   = ImVec4(0.80, 0.80, 0.80, 0.35)
	text= 'Arizona Render by Stenford v2.'..thisScript().version
	textstats= ((u8(' Статистика')))

end


function STYLEblsal()
    imgui.SwitchContext()
    local style = imgui.GetStyle()
    local colors = style.Colors
    local clr = imgui.Col
    local ImVec4 = imgui.ImVec4

  
    colors[clr.FrameBg]                = ImVec4(0.42, 0.48, 0.16, 0.54)
    colors[clr.FrameBgHovered]         = ImVec4(0.85, 0.98, 0.26, 0.40)
    colors[clr.FrameBgActive]          = ImVec4(0.85, 0.98, 0.26, 0.67)
    colors[clr.TitleBg]                = ImVec4(0.04, 0.04, 0.04, prozr)
    colors[clr.TitleBgActive]          = ImVec4(0.42, 0.48, 0.16, prozr)
    colors[clr.TitleBgCollapsed]       = ImVec4(0.00, 0.00, 0.00, 0.51)
    colors[clr.CheckMark]              = ImVec4(0.85, 0.98, 0.26, 1.00)
    colors[clr.SliderGrab]             = ImVec4(0.77, 0.88, 0.24, 1.00)
    colors[clr.SliderGrabActive]       = ImVec4(0.85, 0.98, 0.26, 1.00)
    colors[clr.Button]                 = ImVec4(0.85, 0.98, 0.26, 0.40)
    colors[clr.ButtonHovered]          = ImVec4(0.85, 0.98, 0.26, 1.00)
    colors[clr.ButtonActive]           = ImVec4(0.82, 0.98, 0.06, 1.00)
    colors[clr.Header]                 = ImVec4(0.85, 0.98, 0.26, 0.31)
    colors[clr.HeaderHovered]          = ImVec4(0.85, 0.98, 0.26, 0.80)
    colors[clr.HeaderActive]           = ImVec4(0.85, 0.98, 0.26, 1.00)
    colors[clr.Separator]              = colors[clr.Border]
    colors[clr.SeparatorHovered]       = ImVec4(0.63, 0.75, 0.10, 0.78)
    colors[clr.SeparatorActive]        = ImVec4(0.63, 0.75, 0.10, 1.00)
    colors[clr.ResizeGrip]             = ImVec4(0.85, 0.98, 0.26, 0.25)
    colors[clr.ResizeGripHovered]      = ImVec4(0.85, 0.98, 0.26, 0.67)
    colors[clr.ResizeGripActive]       = ImVec4(0.85, 0.98, 0.26, 0.95)
    colors[clr.PlotLines]              = ImVec4(0.61, 0.61, 0.61, 1.00)
    colors[clr.PlotLinesHovered]       = ImVec4(1.00, 0.81, 0.35, 1.00)
    colors[clr.TextSelectedBg]         = ImVec4(0.85, 0.98, 0.26, 0.35)
    colors[clr.Text]                   = ImVec4(1.00, 1.00, 1.00, prozr)
    colors[clr.TextDisabled]                   = ImVec4(1.00, 1.00, 1.00, prozr)  
    colors[clr.WindowBg]               = ImVec4(0.06, 0.06, 0.06, prozr)
    colors[clr.ChildWindowBg]          = ImVec4(1.00, 1.00, 1.00, 0.00)
    colors[clr.PopupBg]                = ImVec4(0.08, 0.08, 0.08, 0.94)
    colors[clr.ComboBg]                = colors[clr.PopupBg]
    colors[clr.Border]                 = ImVec4(0.43, 0.43, 0.50, 0.50)
    colors[clr.BorderShadow]           = ImVec4(0.00, 0.00, 0.00, 0.00)
    colors[clr.MenuBarBg]              = ImVec4(0.14, 0.14, 0.14, 1.00)
    colors[clr.ScrollbarBg]            = ImVec4(0.02, 0.02, 0.02, 0.53)
    colors[clr.ScrollbarGrab]          = ImVec4(0.31, 0.31, 0.31, 1.00)
    colors[clr.ScrollbarGrabHovered]   = ImVec4(0.41, 0.41, 0.41, 1.00)
    colors[clr.ScrollbarGrabActive]    = ImVec4(0.51, 0.51, 0.51, 1.00)
    colors[clr.CloseButton]            = ImVec4(0.41, 0.41, 0.41, 0.50)
    colors[clr.CloseButtonHovered]     = ImVec4(0.98, 0.39, 0.36, 1.00)
    colors[clr.CloseButtonActive]      = ImVec4(0.98, 0.39, 0.36, 1.00)
    colors[clr.PlotHistogram]          = ImVec4(0.90, 0.70, 0.00, 1.00)
    colors[clr.PlotHistogramHovered]   = ImVec4(1.00, 0.60, 0.00, 1.00)
    colors[clr.ModalWindowDarkening]   = ImVec4(0.80, 0.80, 0.80, 0.35)
	text= 'Arizona Render by Stenford v2.'..thisScript().version
	textstats= ((u8(' Статистика')))
end

function STYLEblue()
    imgui.SwitchContext()
    local style = imgui.GetStyle()
    local colors = style.Colors
    local clr = imgui.Col
    local ImVec4 = imgui.ImVec4



    colors[clr.FrameBg]                = ImVec4(0.16, 0.48, 0.42, 0.54)
    colors[clr.FrameBgHovered]         = ImVec4(0.26, 0.98, 0.85, 0.40)
    colors[clr.FrameBgActive]          = ImVec4(0.26, 0.98, 0.85, 0.67)
    colors[clr.TitleBg]                = ImVec4(0.04, 0.04, 0.04, prozr)
    colors[clr.TitleBgActive]          = ImVec4(0.16, 0.48, 0.42, prozr)
    colors[clr.TitleBgCollapsed]       = ImVec4(0.00, 0.00, 0.00, 0.51)
    colors[clr.CheckMark]              = ImVec4(0.26, 0.98, 0.85, 1.00)
    colors[clr.SliderGrab]             = ImVec4(0.24, 0.88, 0.77, 1.00)
    colors[clr.SliderGrabActive]       = ImVec4(0.26, 0.98, 0.85, 1.00)
    colors[clr.Button]                 = ImVec4(0.26, 0.98, 0.85, 0.40)
    colors[clr.ButtonHovered]          = ImVec4(0.26, 0.98, 0.85, 1.00)
    colors[clr.ButtonActive]           = ImVec4(0.06, 0.98, 0.82, 1.00)
    colors[clr.Header]                 = ImVec4(0.26, 0.98, 0.85, 0.31)
    colors[clr.HeaderHovered]          = ImVec4(0.26, 0.98, 0.85, 0.80)
    colors[clr.HeaderActive]           = ImVec4(0.26, 0.98, 0.85, 1.00)
    colors[clr.Separator]              = colors[clr.Border]
    colors[clr.SeparatorHovered]       = ImVec4(0.10, 0.75, 0.63, 0.78)
    colors[clr.SeparatorActive]        = ImVec4(0.10, 0.75, 0.63, 1.00)
    colors[clr.ResizeGrip]             = ImVec4(0.26, 0.98, 0.85, 0.25)
    colors[clr.ResizeGripHovered]      = ImVec4(0.26, 0.98, 0.85, 0.67)
    colors[clr.ResizeGripActive]       = ImVec4(0.26, 0.98, 0.85, 0.95)
    colors[clr.PlotLines]              = ImVec4(0.61, 0.61, 0.61, 1.00)
    colors[clr.PlotLinesHovered]       = ImVec4(1.00, 0.81, 0.35, 1.00)
    colors[clr.TextSelectedBg]         = ImVec4(0.26, 0.98, 0.85, 0.35)
    colors[clr.Text]                   = ImVec4(1.00, 1.00, 1.00, prozr)
    colors[clr.Text]                   = ImVec4(1.00, 1.00, 1.00, prozr) 
    colors[clr.WindowBg]               = ImVec4(0.06, 0.06, 0.06, prozr)
    colors[clr.ChildWindowBg]          = ImVec4(1.00, 1.00, 1.00, 0.00)
    colors[clr.PopupBg]                = ImVec4(0.08, 0.08, 0.08, 0.94)
    colors[clr.ComboBg]                = colors[clr.PopupBg]
    colors[clr.Border]                 = ImVec4(0.43, 0.43, 0.50, 0.50)
    colors[clr.BorderShadow]           = ImVec4(0.00, 0.00, 0.00, 0.00)
    colors[clr.MenuBarBg]              = ImVec4(0.14, 0.14, 0.14, 1.00)
    colors[clr.ScrollbarBg]            = ImVec4(0.02, 0.02, 0.02, 0.53)
    colors[clr.ScrollbarGrab]          = ImVec4(0.31, 0.31, 0.31, 1.00)
    colors[clr.ScrollbarGrabHovered]   = ImVec4(0.41, 0.41, 0.41, 1.00)
    colors[clr.ScrollbarGrabActive]    = ImVec4(0.51, 0.51, 0.51, 1.00)
    colors[clr.CloseButton]            = ImVec4(0.41, 0.41, 0.41, 0.50)
    colors[clr.CloseButtonHovered]     = ImVec4(0.98, 0.39, 0.36, 1.00)
    colors[clr.CloseButtonActive]      = ImVec4(0.98, 0.39, 0.36, 1.00)
    colors[clr.PlotHistogram]          = ImVec4(0.90, 0.70, 0.00, 1.00)
    colors[clr.PlotHistogramHovered]   = ImVec4(1.00, 0.60, 0.00, 1.00)
    colors[clr.ModalWindowDarkening]   = ImVec4(0.80, 0.80, 0.80, 0.35)
	text= 'Arizona Render by Stenford v2.'..thisScript().version
	textstats= ((u8(' Статистика')))
end

function STYLEblack()
  --source: https://www.unknowncheats.me/forum/direct3d/189635-imgui-style-settings.html
  imgui.SwitchContext()
  local style = imgui.GetStyle()
  local colors = style.Colors
  local clr = imgui.Col
  local ImVec4 = imgui.ImVec4
 
  colors[clr.Text] = ImVec4(0.80, 0.80, 0.83, prozr)
  colors[clr.TextDisabled] = ImVec4(0.80, 0.80, 0.83, prozr) 
  colors[clr.WindowBg] = ImVec4(0.06, 0.05, 0.07, prozr)
  colors[clr.ChildWindowBg] = ImVec4(0.07, 0.07, 0.09, 1.00)
  colors[clr.PopupBg] = ImVec4(0.07, 0.07, 0.09, 1.00)
  colors[clr.Border] = ImVec4(0.80, 0.80, 0.83, 0.88)
  colors[clr.BorderShadow] = ImVec4(0.92, 0.91, 0.88, 0.00)
  colors[clr.FrameBg] = ImVec4(0.10, 0.09, 0.12, 1.00)
  colors[clr.FrameBgHovered] = ImVec4(0.24, 0.23, 0.29, 1.00)
  colors[clr.FrameBgActive] = ImVec4(0.56, 0.56, 0.58, 1.00)
  colors[clr.TitleBg] = ImVec4(0.10, 0.09, 0.12, 1.00)
  colors[clr.TitleBgCollapsed] = ImVec4(1.00, 0.98, 0.95, 0.75)
  colors[clr.TitleBgActive] = ImVec4(0.07, 0.07, 0.09, prozr)
  colors[clr.MenuBarBg] = ImVec4(0.10, 0.09, 0.12,prozr)
  colors[clr.ScrollbarBg] = ImVec4(0.10, 0.09, 0.12, 1.00)
  colors[clr.ScrollbarGrab] = ImVec4(0.80, 0.80, 0.83, 0.31)
  colors[clr.ScrollbarGrabHovered] = ImVec4(0.56, 0.56, 0.58, 1.00)
  colors[clr.ScrollbarGrabActive] = ImVec4(0.06, 0.05, 0.07, 1.00)
  colors[clr.ComboBg] = ImVec4(0.19, 0.18, 0.21, 1.00)
  colors[clr.CheckMark] = ImVec4(0.80, 0.80, 0.83, 0.31)
  colors[clr.SliderGrab] = ImVec4(0.80, 0.80, 0.83, 0.31)
  colors[clr.SliderGrabActive] = ImVec4(0.06, 0.05, 0.07, 1.00)
  colors[clr.Button] = ImVec4(0.10, 0.09, 0.12, 1.00)
  colors[clr.ButtonHovered] = ImVec4(0.24, 0.23, 0.29, 1.00)
  colors[clr.ButtonActive] = ImVec4(0.56, 0.56, 0.58, 1.00)
  colors[clr.Header] = ImVec4(0.10, 0.09, 0.12, 1.00)
  colors[clr.HeaderHovered] = ImVec4(0.56, 0.56, 0.58, 1.00)
  colors[clr.HeaderActive] = ImVec4(0.06, 0.05, 0.07, 1.00)
  colors[clr.ResizeGrip] = ImVec4(0.00, 0.00, 0.00, 0.00)
  colors[clr.ResizeGripHovered] = ImVec4(0.56, 0.56, 0.58, 1.00)
  colors[clr.ResizeGripActive] = ImVec4(0.06, 0.05, 0.07, 1.00)
  colors[clr.CloseButton] = ImVec4(0.40, 0.39, 0.38, 0.16)
  colors[clr.CloseButtonHovered] = ImVec4(0.40, 0.39, 0.38, 0.39)
  colors[clr.CloseButtonActive] = ImVec4(0.40, 0.39, 0.38, 1.00)
  colors[clr.PlotLines] = ImVec4(0.40, 0.39, 0.38, 0.63)
  colors[clr.PlotLinesHovered] = ImVec4(0.25, 1.00, 0.00, 1.00)
  colors[clr.PlotHistogram] = ImVec4(0.40, 0.39, 0.38, 0.63)
  colors[clr.PlotHistogramHovered] = ImVec4(0.25, 1.00, 0.00, 1.00)
  colors[clr.TextSelectedBg] = ImVec4(0.25, 1.00, 0.00, 0.43)
  colors[clr.ModalWindowDarkening] = ImVec4(1.00, 0.98, 0.95, 0.73)
 
  text= 'Arizona Render by Stenford v2.'..thisScript().version
	textstats= ((u8(' Статистика')))
end
 
 function STYLEkor()
    imgui.SwitchContext()
    local style = imgui.GetStyle()
    local colors = style.Colors
    local clr = imgui.Col
    local ImVec4 = imgui.ImVec4

 

    colors[clr.FrameBg]                = ImVec4(0.48, 0.23, 0.16, 0.54)
    colors[clr.FrameBgHovered]         = ImVec4(0.98, 0.43, 0.26, 0.40)
    colors[clr.FrameBgActive]          = ImVec4(0.98, 0.43, 0.26, 0.67)
    colors[clr.TitleBg]                = ImVec4(0.04, 0.04, 0.04, prozr)
    colors[clr.TitleBgActive]          = ImVec4(0.48, 0.23, 0.16, prozr)
    colors[clr.TitleBgCollapsed]       = ImVec4(0.00, 0.00, 0.00, 0.51)
    colors[clr.CheckMark]              = ImVec4(0.98, 0.43, 0.26, 1.00)
    colors[clr.SliderGrab]             = ImVec4(0.88, 0.39, 0.24, 1.00)
    colors[clr.SliderGrabActive]       = ImVec4(0.98, 0.43, 0.26, 1.00)
    colors[clr.Button]                 = ImVec4(0.98, 0.43, 0.26, 0.40)
    colors[clr.ButtonHovered]          = ImVec4(0.98, 0.43, 0.26, 1.00)
    colors[clr.ButtonActive]           = ImVec4(0.98, 0.28, 0.06, 1.00)
    colors[clr.Header]                 = ImVec4(0.98, 0.43, 0.26, 0.31)
    colors[clr.HeaderHovered]          = ImVec4(0.98, 0.43, 0.26, 0.80)
    colors[clr.HeaderActive]           = ImVec4(0.98, 0.43, 0.26, 1.00)
    colors[clr.Separator]              = colors[clr.Border]
    colors[clr.SeparatorHovered]       = ImVec4(0.75, 0.25, 0.10, 0.78)
    colors[clr.SeparatorActive]        = ImVec4(0.75, 0.25, 0.10, 1.00)
    colors[clr.ResizeGrip]             = ImVec4(0.98, 0.43, 0.26, 0.25)
    colors[clr.ResizeGripHovered]      = ImVec4(0.98, 0.43, 0.26, 0.67)
    colors[clr.ResizeGripActive]       = ImVec4(0.98, 0.43, 0.26, 0.95)
    colors[clr.PlotLines]              = ImVec4(0.61, 0.61, 0.61, 1.00)
    colors[clr.PlotLinesHovered]       = ImVec4(1.00, 0.50, 0.35, 1.00)
    colors[clr.TextSelectedBg]         = ImVec4(0.98, 0.43, 0.26, 0.35)
    colors[clr.Text]                   = ImVec4(1.00, 1.00, 1.00, prozr)
    colors[clr.TextDisabled]                   = ImVec4(1.00, 1.00, 1.00, prozr) 
    colors[clr.WindowBg]               = ImVec4(0.06, 0.06, 0.06, prozr)
    colors[clr.ChildWindowBg]          = ImVec4(1.00, 1.00, 1.00, 0.00)
    colors[clr.PopupBg]                = ImVec4(0.08, 0.08, 0.08, 0.94)
    colors[clr.ComboBg]                = colors[clr.PopupBg]
    colors[clr.Border]                 = ImVec4(0.43, 0.43, 0.50, 0.50)
    colors[clr.BorderShadow]           = ImVec4(0.00, 0.00, 0.00, 0.00)
    colors[clr.MenuBarBg]              = ImVec4(0.14, 0.14, 0.14, 1.00)
    colors[clr.ScrollbarBg]            = ImVec4(0.02, 0.02, 0.02, 0.53)
    colors[clr.ScrollbarGrab]          = ImVec4(0.31, 0.31, 0.31, 1.00)
    colors[clr.ScrollbarGrabHovered]   = ImVec4(0.41, 0.41, 0.41, 1.00)
    colors[clr.ScrollbarGrabActive]    = ImVec4(0.51, 0.51, 0.51, 1.00)
    colors[clr.CloseButton]            = ImVec4(0.41, 0.41, 0.41, 0.50)
    colors[clr.CloseButtonHovered]     = ImVec4(0.98, 0.39, 0.36, 1.00)
    colors[clr.CloseButtonActive]      = ImVec4(0.98, 0.39, 0.36, 1.00)
    colors[clr.PlotHistogram]          = ImVec4(0.90, 0.70, 0.00, 1.00)
    colors[clr.PlotHistogramHovered]   = ImVec4(1.00, 0.60, 0.00, 1.00)
    colors[clr.ModalWindowDarkening]   = ImVec4(0.80, 0.80, 0.80, 0.35)
	text= 'Arizona Render by Stenford v2.'..thisScript().version
	textstats= ((u8(' Статистика')))
end


		function temnozel()
imgui.SwitchContext()
        local style  = imgui.GetStyle()
        local colors = style.Colors
        local clr    = imgui.Col
        local ImVec4 = imgui.ImVec4
        local ImVec2 = imgui.ImVec2
    
       
    
        colors[clr.Text]                 = ImVec4(1.00, 1.00, 1.00, prozr)
        colors[clr.TextDisabled]                 = ImVec4(1.00, 1.00, 1.00, prozr)  
        colors[clr.WindowBg]             = ImVec4(0.09, 0.09, 0.09, prozr)
        colors[clr.ChildWindowBg]        = ImVec4(0.00, 0.00, 0.00, 0.00)
        colors[clr.PopupBg]              = ImVec4(0.08, 0.08, 0.08, 0.94)
        colors[clr.Border]               = ImVec4(0.20, 0.20, 0.20, 0.50)
        colors[clr.BorderShadow]         = ImVec4(0.00, 0.00, 0.00, 0.00)
        colors[clr.FrameBg]              = ImVec4(0.41, 0.49, 0.24, 0.54)
        colors[clr.FrameBgHovered]       = ImVec4(0.26, 0.32, 0.13, 0.54)
        colors[clr.FrameBgActive]        = ImVec4(0.33, 0.39, 0.20, 0.54)
        colors[clr.TitleBg]              = ImVec4(0.61, 0.78, 0.21, prozr)
        colors[clr.TitleBgActive]        = ImVec4(0.42, 0.47, 0.32, prozr)
        colors[clr.TitleBgCollapsed]     = ImVec4(0.33, 0.44, 0.26, 0.67)
        colors[clr.MenuBarBg]            = ImVec4(0.60, 0.67, 0.44, 0.54)
        colors[clr.ScrollbarBg]          = ImVec4(0.02, 0.02, 0.02, 0.53)
        colors[clr.ScrollbarGrab]        = ImVec4(0.31, 0.31, 0.31, 1.00)
        colors[clr.ScrollbarGrabHovered] = ImVec4(0.41, 0.41, 0.41, 1.00)
        colors[clr.ScrollbarGrabActive]  = ImVec4(0.51, 0.51, 0.51, 1.00)
        colors[clr.ComboBg]              = ImVec4(0.20, 0.20, 0.20, 0.99)
        colors[clr.CheckMark]            = ImVec4(1.00, 1.00, 1.00, 1.00)
        colors[clr.SliderGrab]           = ImVec4(0.35, 0.43, 0.16, 0.84)
        colors[clr.SliderGrabActive]     = ImVec4(0.53, 0.53, 0.53, 1.00)
        colors[clr.Button]               = ImVec4(0.29, 0.31, 0.25, 0.54)
        colors[clr.ButtonHovered]        = ImVec4(0.62, 0.75, 0.32, 0.54)
        colors[clr.ButtonActive]         = ImVec4(0.20, 0.20, 0.20, 0.50)
        colors[clr.Header]               = ImVec4(0.33, 0.42, 0.15, 0.54)
        colors[clr.HeaderHovered]        = ImVec4(0.84, 0.66, 0.66, 0.65)
        colors[clr.HeaderActive]         = ImVec4(0.84, 0.66, 0.66, 0.00)
        colors[clr.Separator]            = ImVec4(0.43, 0.43, 0.50, 0.50)
        colors[clr.SeparatorHovered]     = ImVec4(0.43, 0.54, 0.18, 0.54)
        colors[clr.SeparatorActive]      = ImVec4(0.52, 0.62, 0.28, 0.54)
        colors[clr.ResizeGrip]           = ImVec4(0.66, 0.80, 0.35, 0.54)
        colors[clr.ResizeGripHovered]    = ImVec4(0.44, 0.48, 0.34, 0.54)
        colors[clr.ResizeGripActive]     = ImVec4(0.37, 0.37, 0.35, 0.54)
        colors[clr.CloseButton]          = ImVec4(0.41, 0.41, 0.41, 1.00)
        colors[clr.CloseButtonHovered]   = ImVec4(0.52, 0.63, 0.26, 0.54)
        colors[clr.CloseButtonActive]    = ImVec4(0.81, 1.00, 0.37, 0.54)
        colors[clr.PlotLines]            = ImVec4(0.61, 0.61, 0.61, 1.00)
        colors[clr.PlotLinesHovered]     = ImVec4(0.79, 1.00, 0.32, 0.54)
        colors[clr.PlotHistogram]        = ImVec4(0.90, 0.70, 0.00, 1.00)
        colors[clr.PlotHistogramHovered] = ImVec4(1.00, 0.60, 0.00, 1.00)
        colors[clr.TextSelectedBg]       = ImVec4(0.26, 0.59, 0.98, 0.35)
        colors[clr.ModalWindowDarkening] = ImVec4(0.80, 0.80, 0.80, 0.35)
		text= 'Arizona Render by Stenford v2.'..thisScript().version
	textstats= ((u8(' Статистика')))
		end

function BH_theme()
    imgui.SwitchContext()
    local style = imgui.GetStyle()
    local colors = style.Colors
    local clr = imgui.Col
    local ImVec4 = imgui.ImVec4
    local ImVec2 = imgui.ImVec2
 
 

    colors[clr.Text]                   = ImVec4(1.00, 1.00, 1.00, prozr)
    colors[clr.TextDisabled]                   = ImVec4(1.00, 1.00, 1.00, prozr)  
    colors[clr.WindowBg]               = ImVec4(0.16, 0.18, 0.22,prozr)
    colors[clr.ChildWindowBg]          = ImVec4(0.19, 0.22, 0.26, 1)
    colors[clr.PopupBg]                = ImVec4(0.05, 0.05, 0.10, 0.90)
    colors[clr.Border]                 = ImVec4(0.19, 0.22, 0.26, 1.00)
    colors[clr.BorderShadow]           = ImVec4(0.00, 0.00, 0.00, 0.00)
    colors[clr.FrameBg]                = ImVec4(0.19, 0.22, 0.26, 1.00)
    colors[clr.FrameBgHovered]         = ImVec4(0.22, 0.25, 0.30, 1.00)
    colors[clr.FrameBgActive]          = ImVec4(0.22, 0.25, 0.29, 1.00)
    colors[clr.TitleBg]                = ImVec4(0.19, 0.22, 0.26, prozr)
    colors[clr.TitleBgActive]          = ImVec4(0.19, 0.22, 0.26, prozr)
    colors[clr.TitleBgCollapsed]       = ImVec4(0.19, 0.22, 0.26, 0.59)
    colors[clr.MenuBarBg]              = ImVec4(0.19, 0.22, 0.26, 1.00)
    colors[clr.ScrollbarBg]            = ImVec4(0.20, 0.25, 0.30, 0.60)
    colors[clr.ScrollbarGrab]          = ImVec4(0.41, 0.55, 0.78, 1.00)
    colors[clr.ScrollbarGrabHovered]   = ImVec4(0.49, 0.63, 0.86, 1.00)
    colors[clr.ScrollbarGrabActive]    = ImVec4(0.49, 0.63, 0.86, 1.00)
    colors[clr.ComboBg]                = ImVec4(0.20, 0.20, 0.20, 0.99)
    colors[clr.CheckMark]              = ImVec4(0.90, 0.90, 0.90, 0.50)
    colors[clr.SliderGrab]             = ImVec4(1.00, 1.00, 1.00, 0.30)
    colors[clr.SliderGrabActive]       = ImVec4(0.80, 0.50, 0.50, 1.00)
    colors[clr.Button]                 = ImVec4(0.41, 0.55, 0.78, 1.00)
    colors[clr.ButtonHovered]          = ImVec4(0.49, 0.62, 0.85, 1.00)
    colors[clr.ButtonActive]           = ImVec4(0.49, 0.62, 0.85, 1.00)
    colors[clr.Header]                 = ImVec4(0.19, 0.22, 0.26, 1.00)
    colors[clr.HeaderHovered]          = ImVec4(0.22, 0.24, 0.28, 1.00)
    colors[clr.HeaderActive]           = ImVec4(0.22, 0.24, 0.28, 1.00)
    colors[clr.Separator]              = ImVec4(0.41, 0.55, 0.78, 1.00)
    colors[clr.SeparatorHovered]       = ImVec4(0.41, 0.55, 0.78, 1.00)
    colors[clr.SeparatorActive]        = ImVec4(0.41, 0.55, 0.78, 1.00)
    colors[clr.ResizeGrip]             = ImVec4(0.41, 0.55, 0.78, 1.00)
    colors[clr.ResizeGripHovered]      = ImVec4(0.49, 0.61, 0.83, 1.00)
    colors[clr.ResizeGripActive]       = ImVec4(0.49, 0.62, 0.83, 1.00)
    colors[clr.CloseButton]            = ImVec4(0.41, 0.55, 0.78, 1.00)
    colors[clr.CloseButtonHovered]     = ImVec4(0.50, 0.63, 0.84, 1.00)
    colors[clr.CloseButtonActive]      = ImVec4(0.41, 0.55, 0.78, 1.00)
    colors[clr.PlotLines]              = ImVec4(1.00, 1.00, 1.00, 1.00)
    colors[clr.PlotLinesHovered]       = ImVec4(0.90, 0.70, 0.00, 1.00)
    colors[clr.PlotHistogram]          = ImVec4(0.90, 0.70, 0.00, 1.00)
    colors[clr.PlotHistogramHovered]   = ImVec4(1.00, 0.60, 0.00, 1.00)
    colors[clr.TextSelectedBg]         = ImVec4(0.41, 0.55, 0.78, 1.00)
    colors[clr.ModalWindowDarkening]   = ImVec4(0.16, 0.18, 0.22, 0.76)
	text= 'Arizona Render by Stenford v2.'..thisScript().version
	textstats= ((u8(' Статистика')))
end


function setLightStyle()
    -- light style from Pacome Danhiez (user itamago) https://github.com/ocornut/imgui/pull/511#issuecomment-175719267

    local style = imgui.GetStyle()
    local colors = style.Colors
    local clr = imgui.Col
    local ImVec4 = imgui.ImVec4

    colors[clr.Text] = ImVec4(0.00, 0.00, 0.00, prozr)
    colors[clr.TextDisabled] = ImVec4(0.00, 0.00, 0.00, prozr) 
    colors[clr.WindowBg] = ImVec4(0.94, 0.94, 0.94, prozr)
    colors[clr.ChildWindowBg] = ImVec4(0.00, 0.00, 0.00, 0.00)
    colors[clr.PopupBg] = ImVec4(1.00, 1.00, 1.00, 0.94)
    colors[clr.Border]= ImVec4(0.00, 0.00, 0.00, 0.39)
    colors[clr.BorderShadow] = ImVec4(1.00, 1.00, 1.00, 0.10)
    colors[clr.FrameBg] = ImVec4(1.00, 1.00, 1.00, 0.94)
    colors[clr.FrameBgHovered]= ImVec4(0.26, 0.59, 0.98, 0.40)
    colors[clr.FrameBgActive] = ImVec4(0.26, 0.59, 0.98, 0.67)
    colors[clr.TitleBg] = ImVec4(0.96, 0.96, 0.96, prozr)
    colors[clr.TitleBgCollapsed] = ImVec4(1.00, 1.00, 1.00, 0.51)
    colors[clr.TitleBgActive] = ImVec4(0.82, 0.82, 0.82, prozr)
    colors[clr.MenuBarBg] = ImVec4(0.86, 0.86, 0.86, 1.00)
    colors[clr.ScrollbarBg] = ImVec4(0.98, 0.98, 0.98, 0.53)
    colors[clr.ScrollbarGrab] = ImVec4(0.69, 0.69, 0.69, 1.00)
    colors[clr.ScrollbarGrabHovered] = ImVec4(0.59, 0.59, 0.59, 1.00)
    colors[clr.ScrollbarGrabActive] = ImVec4(0.49, 0.49, 0.49, 1.00)
    colors[clr.ComboBg] = ImVec4(0.86, 0.86, 0.86, 0.99)
    colors[clr.CheckMark] = ImVec4(0.26, 0.59, 0.98, 1.00)
    colors[clr.SliderGrab] = ImVec4(0.24, 0.52, 0.88, 1.00)
    colors[clr.SliderGrabActive] = ImVec4(0.26, 0.59, 0.98, 1.00)
    colors[clr.Button]= ImVec4(0.26, 0.59, 0.98, 0.40)
    colors[clr.ButtonHovered] = ImVec4(0.26, 0.59, 0.98, 1.00)
    colors[clr.ButtonActive] = ImVec4(0.06, 0.53, 0.98, 1.00)
    colors[clr.Header]= ImVec4(0.26, 0.59, 0.98, 0.31)
    colors[clr.HeaderHovered] = ImVec4(0.26, 0.59, 0.98, 0.80)
    colors[clr.HeaderActive] = ImVec4(0.26, 0.59, 0.98, 1.00)
    colors[clr.ResizeGrip] = ImVec4(1.00, 1.00, 1.00, 0.50)
    colors[clr.ResizeGripHovered] = ImVec4(0.26, 0.59, 0.98, 0.67)
    colors[clr.ResizeGripActive] = ImVec4(0.26, 0.59, 0.98, 0.95)
    colors[clr.CloseButton] = ImVec4(0.59, 0.59, 0.59, 0.50)
    colors[clr.CloseButtonHovered] = ImVec4(0.98, 0.39, 0.36, 1.00)
    colors[clr.CloseButtonActive] = ImVec4(0.98, 0.39, 0.36, 1.00)
    colors[clr.PlotLines] = ImVec4(0.39, 0.39, 0.39, 1.00)
    colors[clr.PlotLinesHovered] = ImVec4(1.00, 0.43, 0.35, 1.00)
    colors[clr.PlotHistogram] = ImVec4(0.90, 0.70, 0.00, 1.00)
    colors[clr.PlotHistogramHovered] = ImVec4(1.00, 0.60, 0.00, 1.00)
    colors[clr.TextSelectedBg]= ImVec4(0.26, 0.59, 0.98, 0.35)
    colors[clr.ModalWindowDarkening] = ImVec4(0.20, 0.20, 0.20, 0.35)
	text= 'Arizona Render by Stenford v2.'..thisScript().version
	textstats= ((u8(' Статистика')))

end

function STYLEgrey()
    imgui.SwitchContext()
    local style = imgui.GetStyle()
    local colors = style.Colors
    local clr = imgui.Col
    local ImVec4 = imgui.ImVec4
   


    colors[clr.Text]                   = ImVec4(0.90, 0.90, 0.90, prozr)
    colors[clr.TextDisabled]                   = ImVec4(0.90, 0.90, 0.90, prozr) 
    colors[clr.WindowBg]               = ImVec4(0.00, 0.00, 0.00, prozr)
    colors[clr.ChildWindowBg]          = ImVec4(0.00, 0.00, 0.00, 1.00)
    colors[clr.PopupBg]                = ImVec4(0.00, 0.00, 0.00, 1.00)
    colors[clr.Border]                 = ImVec4(0.82, 0.77, 0.78, 1.00)
    colors[clr.BorderShadow]           = ImVec4(0.35, 0.35, 0.35, 0.66)
    colors[clr.FrameBg]                = ImVec4(1.00, 1.00, 1.00, 0.28)
    colors[clr.FrameBgHovered]         = ImVec4(0.68, 0.68, 0.68, 0.67)
    colors[clr.FrameBgActive]          = ImVec4(0.79, 0.73, 0.73, 0.62)
    colors[clr.TitleBg]                = ImVec4(0.00, 0.00, 0.00, prozr)
    colors[clr.TitleBgActive]          = ImVec4(0.46, 0.46, 0.46, prozr)
    colors[clr.TitleBgCollapsed]       = ImVec4(0.00, 0.00, 0.00, 1.00)
    colors[clr.MenuBarBg]              = ImVec4(0.00, 0.00, 0.00, 0.80)
    colors[clr.ScrollbarBg]            = ImVec4(0.00, 0.00, 0.00, 0.60)
    colors[clr.ScrollbarGrab]          = ImVec4(1.00, 1.00, 1.00, 0.87)
    colors[clr.ScrollbarGrabHovered]   = ImVec4(1.00, 1.00, 1.00, 0.79)
    colors[clr.ScrollbarGrabActive]    = ImVec4(0.80, 0.50, 0.50, 0.40)
    colors[clr.ComboBg]                = ImVec4(0.24, 0.24, 0.24, 0.99)
    colors[clr.CheckMark]              = ImVec4(0.99, 0.99, 0.99, 0.52)
    colors[clr.SliderGrab]             = ImVec4(1.00, 1.00, 1.00, 0.42)
    colors[clr.SliderGrabActive]       = ImVec4(0.76, 0.76, 0.76, 1.00)
    colors[clr.Button]                 = ImVec4(0.51, 0.51, 0.51, 0.60)
    colors[clr.ButtonHovered]          = ImVec4(0.68, 0.68, 0.68, 1.00)
    colors[clr.ButtonActive]           = ImVec4(0.67, 0.67, 0.67, 1.00)
    colors[clr.Header]                 = ImVec4(0.72, 0.72, 0.72, 0.54)
    colors[clr.HeaderHovered]          = ImVec4(0.92, 0.92, 0.95, 0.77)
    colors[clr.HeaderActive]           = ImVec4(0.82, 0.82, 0.82, 0.80)
    colors[clr.Separator]              = ImVec4(0.73, 0.73, 0.73, 1.00)
    colors[clr.SeparatorHovered]       = ImVec4(0.81, 0.81, 0.81, 1.00)
    colors[clr.SeparatorActive]        = ImVec4(0.74, 0.74, 0.74, 1.00)
    colors[clr.ResizeGrip]             = ImVec4(0.80, 0.80, 0.80, 0.30)
    colors[clr.ResizeGripHovered]      = ImVec4(0.95, 0.95, 0.95, 0.60)
    colors[clr.ResizeGripActive]       = ImVec4(1.00, 1.00, 1.00, 0.90)
    colors[clr.CloseButton]            = ImVec4(0.45, 0.45, 0.45, 0.50)
    colors[clr.CloseButtonHovered]     = ImVec4(0.70, 0.70, 0.90, 0.60)
    colors[clr.CloseButtonActive]      = ImVec4(0.70, 0.70, 0.70, 1.00)
    colors[clr.PlotLines]              = ImVec4(1.00, 1.00, 1.00, 1.00)
    colors[clr.PlotLinesHovered]       = ImVec4(1.00, 1.00, 1.00, 1.00)
    colors[clr.PlotHistogram]          = ImVec4(1.00, 1.00, 1.00, 1.00)
    colors[clr.PlotHistogramHovered]   = ImVec4(1.00, 1.00, 1.00, 1.00)
    colors[clr.TextSelectedBg]         = ImVec4(1.00, 1.00, 1.00, 0.35)
    colors[clr.ModalWindowDarkening]   = ImVec4(0.88, 0.88, 0.88, 0.35)
	text= 'Arizona Render by Stenford v2.'..thisScript().version
	textstats= ((u8(' Статистика')))
end

function CherryTheme()
  imgui.SwitchContext()
  local style = imgui.GetStyle()
  local colors = style.Colors
  local clr = imgui.Col
  local ImVec4 = imgui.ImVec4
  local ImVec2 = imgui.ImVec2


  

  colors[clr.Text] = ImVec4(0.860, 0.930, 0.890, prozr)
  colors[clr.TextDisabled] = ImVec4(0.860, 0.930, 0.890, prozr) 
  colors[clr.WindowBg] = ImVec4(0.13, 0.14, 0.17, prozr)
  colors[clr.ChildWindowBg] = ImVec4(0.200, 0.220, 0.270, 0.58)
  colors[clr.PopupBg] = ImVec4(0.200, 0.220, 0.270, 0.9)
  colors[clr.Border] = ImVec4(0.31, 0.31, 1.00, 0.00)
  colors[clr.BorderShadow] = ImVec4(0.00, 0.00, 0.00, 0.00)
  colors[clr.FrameBg] = ImVec4(0.200, 0.220, 0.270, 1.00)
  colors[clr.FrameBgHovered] = ImVec4(0.455, 0.198, 0.301, 0.78)
  colors[clr.FrameBgActive] = ImVec4(0.455, 0.198, 0.301, 1.00)
  colors[clr.TitleBg] = ImVec4(0.232, 0.201, 0.271,prozr)
  colors[clr.TitleBgActive] = ImVec4(0.502, 0.075, 0.256, prozr)
  colors[clr.TitleBgCollapsed] = ImVec4(0.200, 0.220, 0.270, 0.75)
  colors[clr.MenuBarBg] = ImVec4(0.200, 0.220, 0.270, 0.47)
  colors[clr.ScrollbarBg] = ImVec4(0.200, 0.220, 0.270, 1.00)
  colors[clr.ScrollbarGrab] = ImVec4(0.09, 0.15, 0.1, 1.00)
  colors[clr.ScrollbarGrabHovered] = ImVec4(0.455, 0.198, 0.301, 0.78)
  colors[clr.ScrollbarGrabActive] = ImVec4(0.455, 0.198, 0.301, 1.00)
  colors[clr.CheckMark] = ImVec4(0.71, 0.22, 0.27, 1.00)
  colors[clr.SliderGrab] = ImVec4(0.47, 0.77, 0.83, 0.14)
  colors[clr.SliderGrabActive] = ImVec4(0.71, 0.22, 0.27, 1.00)
  colors[clr.Button] = ImVec4(0.47, 0.77, 0.83, 0.14)
  colors[clr.ButtonHovered] = ImVec4(0.455, 0.198, 0.301, 0.86)
  colors[clr.ButtonActive] = ImVec4(0.455, 0.198, 0.301, 1.00)
  colors[clr.Header] = ImVec4(0.455, 0.198, 0.301, 0.76)
  colors[clr.HeaderHovered] = ImVec4(0.455, 0.198, 0.301, 0.86)
  colors[clr.HeaderActive] = ImVec4(0.502, 0.075, 0.256, 1.00)
  colors[clr.ResizeGrip] = ImVec4(0.47, 0.77, 0.83, 0.04)
  colors[clr.ResizeGripHovered] = ImVec4(0.455, 0.198, 0.301, 0.78)
  colors[clr.ResizeGripActive] = ImVec4(0.455, 0.198, 0.301, 1.00)
  colors[clr.PlotLines] = ImVec4(0.860, 0.930, 0.890, 0.63)
  colors[clr.PlotLinesHovered] = ImVec4(0.455, 0.198, 0.301, 1.00)
  colors[clr.PlotHistogram] = ImVec4(0.860, 0.930, 0.890, 0.63)
  colors[clr.PlotHistogramHovered] = ImVec4(0.455, 0.198, 0.301, 1.00)
  colors[clr.TextSelectedBg] = ImVec4(0.455, 0.198, 0.301, 0.43)
  colors[clr.ModalWindowDarkening] = ImVec4(0.200, 0.220, 0.270, 0.73)
  text= 'Arizona Render by Stenford v2.'..thisScript().version
	textstats= ((u8(' Статистика')))
end

function STYLEpink()
  imgui.SwitchContext()
  local style  = imgui.GetStyle()
  local colors = style.Colors
  local clr    = imgui.Col
  local ImVec4 = imgui.ImVec4
 
    colors[clr.Text]                 = ImVec4(1.00, 1.00, 1.00, prozr)
    colors[clr.TextDisabled]                 = ImVec4(1.00, 1.00, 1.00, prozr)  
    colors[clr.WindowBg]             = ImVec4(0.09, 0.09, 0.09, prozr)
    colors[clr.ChildWindowBg]        = ImVec4(0.00, 0.00, 0.00, 0.00)
    colors[clr.PopupBg]              = ImVec4(0.08, 0.08, 0.08, 0.94)
    colors[clr.Border]               = ImVec4(0.20, 0.20, 0.20, 0.50)
    colors[clr.BorderShadow]         = ImVec4(0.00, 0.00, 0.00, 0.00)
    colors[clr.FrameBg]              = ImVec4(0.71, 0.39, 0.39, 0.54)
    colors[clr.FrameBgHovered]       = ImVec4(0.84, 0.66, 0.66, 0.40)
    colors[clr.FrameBgActive]        = ImVec4(0.84, 0.66, 0.66, 0.67)
    colors[clr.TitleBg]              = ImVec4(0.47, 0.22, 0.22, prozr)
    colors[clr.TitleBgActive]        = ImVec4(0.47, 0.22, 0.22, prozr)
    colors[clr.TitleBgCollapsed]     = ImVec4(0.47, 0.22, 0.22, 0.67)
    colors[clr.MenuBarBg]            = ImVec4(0.34, 0.16, 0.16, 1.00)
    colors[clr.ScrollbarBg]          = ImVec4(0.02, 0.02, 0.02, 0.53)
    colors[clr.ScrollbarGrab]        = ImVec4(0.31, 0.31, 0.31, 1.00)
    colors[clr.ScrollbarGrabHovered] = ImVec4(0.41, 0.41, 0.41, 1.00)
    colors[clr.ScrollbarGrabActive]  = ImVec4(0.51, 0.51, 0.51, 1.00)
    colors[clr.CheckMark]            = ImVec4(1.00, 1.00, 1.00, 1.00)
    colors[clr.SliderGrab]           = ImVec4(0.71, 0.39, 0.39, 1.00)
    colors[clr.SliderGrabActive]     = ImVec4(0.84, 0.66, 0.66, 1.00)
    colors[clr.Button]               = ImVec4(0.47, 0.22, 0.22, 0.65)
    colors[clr.ButtonHovered]        = ImVec4(0.71, 0.39, 0.39, 0.65)
    colors[clr.ButtonActive]         = ImVec4(0.20, 0.20, 0.20, 0.50)
    colors[clr.Header]               = ImVec4(0.71, 0.39, 0.39, 0.54)
    colors[clr.HeaderHovered]        = ImVec4(0.84, 0.66, 0.66, 0.65)
    colors[clr.HeaderActive]         = ImVec4(0.84, 0.66, 0.66, 0.00)
    colors[clr.Separator]            = ImVec4(0.43, 0.43, 0.50, 0.50)
    colors[clr.SeparatorHovered]     = ImVec4(0.71, 0.39, 0.39, 0.54)
    colors[clr.SeparatorActive]      = ImVec4(0.71, 0.39, 0.39, 0.54)
    colors[clr.ResizeGrip]           = ImVec4(0.71, 0.39, 0.39, 0.54)
    colors[clr.ResizeGripHovered]    = ImVec4(0.84, 0.66, 0.66, 0.66)
    colors[clr.ResizeGripActive]     = ImVec4(0.84, 0.66, 0.66, 0.66)
    colors[clr.CloseButton]          = ImVec4(0.41, 0.41, 0.41, 1.00)
    colors[clr.CloseButtonHovered]   = ImVec4(0.98, 0.39, 0.36, 1.00)
    colors[clr.CloseButtonActive]    = ImVec4(0.98, 0.39, 0.36, 1.00)
    colors[clr.PlotLines]            = ImVec4(0.61, 0.61, 0.61, 1.00)
    colors[clr.PlotLinesHovered]     = ImVec4(1.00, 0.43, 0.35, 1.00)
    colors[clr.PlotHistogram]        = ImVec4(0.90, 0.70, 0.00, 1.00)
    colors[clr.PlotHistogramHovered] = ImVec4(1.00, 0.60, 0.00, 1.00)
    colors[clr.TextSelectedBg]       = ImVec4(0.26, 0.59, 0.98, 0.35)
    colors[clr.ModalWindowDarkening] = ImVec4(0.80, 0.80, 0.80, 0.35)
	text= 'Arizona Render by Stenford v2.'..thisScript().version
	textstats= ((u8(' Статистика')))
end

function salat()
   imgui.SwitchContext()
    local style  = imgui.GetStyle()
    local colors = style.Colors
    local clr    = imgui.Col
    local ImVec4 = imgui.ImVec4
    local ImVec2 = imgui.ImVec2
			colors[clr.Text]                 = ImVec4(1.00, 1.00, 1.00,prozr)
			colors[clr.TextDisabled]                 = ImVec4(1.00, 1.00, 1.00,prozr) 
            colors[clr.WindowBg]             = ImVec4(0.11, 0.15, 0.17, prozr)
            colors[clr.ChildWindowBg]        = ImVec4(0.15, 0.18, 0.22, 1.00)
            colors[clr.PopupBg]              = ImVec4(0.08, 0.08, 0.08, 0.94)
            colors[clr.Border]               = ImVec4(0.43, 0.43, 0.50, 0.50)
            colors[clr.BorderShadow]         = ImVec4(0.00, 0.00, 0.00, 0.00)
            colors[clr.FrameBg]              = ImVec4(0.25, 0.29, 0.20, 1.00)
            colors[clr.FrameBgHovered]       = ImVec4(0.12, 0.20, 0.28, 1.00)
            colors[clr.FrameBgActive]        = ImVec4(0.09, 0.12, 0.14, 1.00)
            colors[clr.TitleBg]              = ImVec4(0.09, 0.12, 0.14, prozr)
            colors[clr.TitleBgActive]        = ImVec4(0.35, 0.58, 0.06, prozr)
            colors[clr.TitleBgCollapsed]     = ImVec4(0.00, 0.00, 0.00, 0.51)
            colors[clr.MenuBarBg]            = ImVec4(0.15, 0.18, 0.22, 1.00)
            colors[clr.ScrollbarBg]          = ImVec4(0.02, 0.02, 0.02, 0.39)
            colors[clr.ScrollbarGrab]        = ImVec4(0.20, 0.25, 0.29, 1.00)
            colors[clr.ScrollbarGrabHovered] = ImVec4(0.18, 0.22, 0.25, 1.00)
            colors[clr.ScrollbarGrabActive]  = ImVec4(0.09, 0.21, 0.31, 1.00)
            colors[clr.ComboBg]              = ImVec4(0.20, 0.25, 0.29, 1.00)
            colors[clr.CheckMark]            = ImVec4(0.72, 1.00, 0.28, 1.00)
            colors[clr.SliderGrab]           = ImVec4(0.43, 0.57, 0.05, 1.00)
            colors[clr.SliderGrabActive]     = ImVec4(0.55, 0.67, 0.15, 1.00)
            colors[clr.Button]               = ImVec4(0.40, 0.57, 0.01, 1.00)
            colors[clr.ButtonHovered]        = ImVec4(0.45, 0.69, 0.07, 1.00)
            colors[clr.ButtonActive]         = ImVec4(0.27, 0.50, 0.00, 1.00)
            colors[clr.Header]               = ImVec4(0.20, 0.25, 0.29, 0.55)
            colors[clr.HeaderHovered]        = ImVec4(0.72, 0.98, 0.26, 0.80)
            colors[clr.HeaderActive]         = ImVec4(0.74, 0.98, 0.26, 1.00)
            colors[clr.Separator]            = ImVec4(0.50, 0.50, 0.50, 1.00)
            colors[clr.SeparatorHovered]     = ImVec4(0.60, 0.60, 0.70, 1.00)
            colors[clr.SeparatorActive]      = ImVec4(0.70, 0.70, 0.90, 1.00)
            colors[clr.ResizeGrip]           = ImVec4(0.68, 0.98, 0.26, 0.25)
            colors[clr.ResizeGripHovered]    = ImVec4(0.72, 0.98, 0.26, 0.67)
            colors[clr.ResizeGripActive]     = ImVec4(0.06, 0.05, 0.07, 1.00)
            colors[clr.CloseButton]          = ImVec4(0.40, 0.39, 0.38, 0.16)
            colors[clr.CloseButtonHovered]   = ImVec4(0.40, 0.39, 0.38, 0.39)
            colors[clr.CloseButtonActive]    = ImVec4(0.40, 0.39, 0.38, 1.00)
            colors[clr.PlotLines]            = ImVec4(0.61, 0.61, 0.61, 1.00)
            colors[clr.PlotLinesHovered]     = ImVec4(1.00, 0.43, 0.35, 1.00)
            colors[clr.PlotHistogram]        = ImVec4(0.90, 0.70, 0.00, 1.00)
            colors[clr.PlotHistogramHovered] = ImVec4(1.00, 0.60, 0.00, 1.00)
            colors[clr.TextSelectedBg]       = ImVec4(0.25, 1.00, 0.00, 0.43)
            colors[clr.ModalWindowDarkening] = ImVec4(1.00, 0.98, 0.95, 0.73)
			text= 'Arizona Render by Stenford v2.'..thisScript().version
	textstats= ((u8(' Статистика')))
end

function glamourPink()
    imgui.SwitchContext()
    local style  = imgui.GetStyle()
    local colors = style.Colors
    local clr    = imgui.Col
    local ImVec4 = imgui.ImVec4
    local ImVec2 = imgui.ImVec2

 

    colors[clr.Text]                 = ImVec4(0.00, 0.00, 0.00, prozr)
    colors[clr.TextDisabled]                 = ImVec4(0.00, 0.00, 0.00, prozr) 
    colors[clr.WindowBg]             = ImVec4(1.00, 1.00, 1.00, prozr)
    colors[clr.ChildWindowBg]        = ImVec4(0.92, 0.92, 0.92, 0.00)
    colors[clr.PopupBg]              = ImVec4(1.00, 1.00, 1.00, 0.94)
    colors[clr.Border]               = ImVec4(1.00, 1.00, 1.00, 0.50)
    colors[clr.BorderShadow]         = ImVec4(1.00, 1.00, 1.00, 0.00)
    colors[clr.FrameBg]              = ImVec4(0.77, 0.49, 0.66, 0.54)
    colors[clr.FrameBgHovered]       = ImVec4(1.00, 1.00, 1.00, 0.40)
    colors[clr.FrameBgActive]        = ImVec4(1.00, 1.00, 1.00, 0.67)
    colors[clr.TitleBg]              = ImVec4(0.76, 0.51, 0.66, prozr)
    colors[clr.TitleBgActive]        = ImVec4(0.97, 0.74, 0.88, prozr)
    colors[clr.TitleBgCollapsed]     = ImVec4(1.00, 1.00, 1.00, 0.67)
    colors[clr.MenuBarBg]            = ImVec4(1.00, 1.00, 1.00, 0.54)
    colors[clr.ScrollbarBg]          = ImVec4(0.81, 0.81, 0.81, 0.54)
    colors[clr.ScrollbarGrab]        = ImVec4(0.78, 0.28, 0.58, 0.13)
    colors[clr.ScrollbarGrabHovered] = ImVec4(1.00, 1.00, 1.00, 1.00)
    colors[clr.ScrollbarGrabActive]  = ImVec4(0.51, 0.51, 0.51, 1.00)
    colors[clr.ComboBg]              = ImVec4(0.20, 0.20, 0.20, 0.99)
    colors[clr.CheckMark]            = ImVec4(1.00, 1.00, 1.00, 1.00)
    colors[clr.SliderGrab]           = ImVec4(0.71, 0.39, 0.39, 1.00)
    colors[clr.SliderGrabActive]     = ImVec4(0.76, 0.51, 0.66, 0.46)
    colors[clr.Button]               = ImVec4(0.78, 0.28, 0.58, 0.54)
    colors[clr.ButtonHovered]        = ImVec4(0.77, 0.52, 0.67, 0.54)
    colors[clr.ButtonActive]         = ImVec4(0.20, 0.20, 0.20, 0.50)
    colors[clr.Header]               = ImVec4(0.78, 0.28, 0.58, 0.54)
    colors[clr.HeaderHovered]        = ImVec4(0.78, 0.28, 0.58, 0.25)
    colors[clr.HeaderActive]         = ImVec4(0.79, 0.04, 0.48, 0.63)
    colors[clr.Separator]            = ImVec4(0.43, 0.43, 0.50, 0.50)
    colors[clr.SeparatorHovered]     = ImVec4(0.79, 0.44, 0.65, 0.64)
    colors[clr.SeparatorActive]      = ImVec4(0.79, 0.17, 0.54, 0.77)
    colors[clr.ResizeGrip]           = ImVec4(0.87, 0.36, 0.66, 0.54)
    colors[clr.ResizeGripHovered]    = ImVec4(0.76, 0.51, 0.66, 0.46)
    colors[clr.ResizeGripActive]     = ImVec4(0.76, 0.51, 0.66, 0.46)
    colors[clr.CloseButton]          = ImVec4(0.41, 0.41, 0.41, 1.00)
    colors[clr.CloseButtonHovered]   = ImVec4(0.76, 0.46, 0.64, 0.71)
    colors[clr.CloseButtonActive]    = ImVec4(0.78, 0.28, 0.58, 0.79)
    colors[clr.PlotLines]            = ImVec4(0.61, 0.61, 0.61, 1.00)
    colors[clr.PlotLinesHovered]     = ImVec4(0.92, 0.92, 0.92, 1.00)
    colors[clr.PlotHistogram]        = ImVec4(0.90, 0.70, 0.00, 1.00)
    colors[clr.PlotHistogramHovered] = ImVec4(1.00, 0.60, 0.00, 1.00)
    colors[clr.TextSelectedBg]       = ImVec4(0.26, 0.59, 0.98, 0.35)
    colors[clr.ModalWindowDarkening] = ImVec4(0.80, 0.80, 0.80, 0.35)
	text= 'Arizona Render by Stenford v2.'..thisScript().version
	textstats= ((u8(' Статистика')))
end

function apply_custom_style()
    imgui.SwitchContext()
    local style = imgui.GetStyle()
    local colors = style.Colors
    local clr = imgui.Col
    local ImVec4 = imgui.ImVec4
    local ImVec2 = imgui.ImVec2
    style.WindowPadding                = ImVec2(4.0, 4.0)
    style.WindowRounding               = 7
    style.WindowTitleAlign             = ImVec2(0.5, 0.5)
    style.FramePadding                 = ImVec2(4.0, 3.0)
    style.ItemSpacing                  = ImVec2(8.0, 4.0)
    style.ItemInnerSpacing             = ImVec2(4.0, 4.0)
    style.ChildWindowRounding          = 7
    style.FrameRounding                = 7
    style.ScrollbarRounding            = 7
    style.GrabRounding                 = 7
    style.IndentSpacing                = 21.0
    style.ScrollbarSize                = 13.0
    style.GrabMinSize                  = 10.0
    style.ButtonTextAlign              = ImVec2(0.5, 0.5)
    colors[clr.WindowBg]               = ImVec4(0.06, 0.06, 0.06, prozr)
    colors[clr.PopupBg]                = ImVec4(0.08, 0.08, 0.08, 0.96)
    colors[clr.Border]                 = ImVec4(0.73, 0.36, 0.00, 0.00)
    colors[clr.FrameBg]                = ImVec4(0.49, 0.24, 0.00, 1.00)
    colors[clr.FrameBgHovered]         = ImVec4(0.65, 0.32, 0.00, 1.00)
    colors[clr.FrameBgActive]          = ImVec4(0.73, 0.36, 0.00, 1.00)
    colors[clr.TitleBg]                = ImVec4(0.15, 0.11, 0.09, prozr)
    colors[clr.TitleBgActive]          = ImVec4(0.73, 0.36, 0.00, prozr)
    colors[clr.TitleBgCollapsed]       = ImVec4(0.15, 0.11, 0.09, 0.51)
    colors[clr.MenuBarBg]              = ImVec4(0.62, 0.31, 0.00, 1.00)
    colors[clr.CheckMark]              = ImVec4(1.00, 0.49, 0.00, 1.00)
    colors[clr.SliderGrab]             = ImVec4(0.84, 0.41, 0.00, 1.00)
    colors[clr.SliderGrabActive]       = ImVec4(0.98, 0.49, 0.00, 1.00)
    colors[clr.Button]                 = ImVec4(0.73, 0.36, 0.00, 0.40)
    colors[clr.ButtonHovered]          = ImVec4(0.73, 0.36, 0.00, 1.00)
    colors[clr.ButtonActive]           = ImVec4(1.00, 0.50, 0.00, 1.00)
    colors[clr.Header]                 = ImVec4(0.49, 0.24, 0.00, 1.00)
    colors[clr.HeaderHovered]          = ImVec4(0.70, 0.35, 0.01, 1.00)
    colors[clr.HeaderActive]           = ImVec4(1.00, 0.49, 0.00, 1.00)
    colors[clr.SeparatorHovered]       = ImVec4(0.49, 0.24, 0.00, 0.78)
    colors[clr.SeparatorActive]        = ImVec4(0.49, 0.24, 0.00, 1.00)
    colors[clr.ResizeGrip]             = ImVec4(0.48, 0.23, 0.00, 1.00)
    colors[clr.ResizeGripHovered]      = ImVec4(0.78, 0.38, 0.00, 1.00)
    colors[clr.ResizeGripActive]       = ImVec4(1.00, 0.49, 0.00, 1.00)
    colors[clr.PlotLines]              = ImVec4(0.83, 0.41, 0.00, 1.00)
    colors[clr.PlotLinesHovered]       = ImVec4(1.00, 0.99, 0.00, 1.00)
    colors[clr.PlotHistogram]          = ImVec4(0.93, 0.46, 0.00, 1.00)
    colors[clr.TextSelectedBg]         = ImVec4(0.26, 0.59, 0.98, 0.00)
    colors[clr.ScrollbarBg]            = ImVec4(0.00, 0.00, 0.00, 0.53)
    colors[clr.ScrollbarGrab]          = ImVec4(0.33, 0.33, 0.33, 1.00)
    colors[clr.ScrollbarGrabHovered]   = ImVec4(0.39, 0.39, 0.39, 1.00)
    colors[clr.ScrollbarGrabActive]    = ImVec4(0.48, 0.48, 0.48, 1.00)
    colors[clr.CloseButton]            = colors[clr.FrameBg]
    colors[clr.CloseButtonHovered]     = colors[clr.FrameBgHovered]
    colors[clr.CloseButtonActive]      = colors[clr.FrameBgActive]
	text= fa.ICON_FA_GHOST..' Arizona Render by Stenford v2.'..thisScript().version..' '..fa.ICON_FA_GHOST
	textstats= (fa.ICON_FA_GHOST..(u8(' Статистика')))
end

   
function getDownKeys()
    local curkeys = ""
    local bool = false
    for k,v in pairs(vkeys) do
        if isKeyDown(v) then
            curkeys = v
            bool = true
        end
    end
    return curkeys, bool
end

function checkDownKey()
    local bool = false 
    for k,v in pairs(vkeys) do 
        if isKeyDown(v) then 
            bool = true 
        end
    end
    return bool 
end

function nameTagOn()
	local pStSet = sampGetServerSettingsPtr();
	NTdist = mem.getfloat(pStSet + 39)
	NTwalls = mem.getint8(pStSet + 47)
	NTshow = mem.getint8(pStSet + 56)
	mem.setfloat(pStSet + 39, 1488.0)
	mem.setint8(pStSet + 47, 0)
	mem.setint8(pStSet + 56, 1)
	nameTag = true
end

function nameTagOff()
	local pStSet = sampGetServerSettingsPtr();
	mem.setfloat(pStSet + 39, NTdist)
	mem.setint8(pStSet + 47, NTwalls)
	mem.setint8(pStSet + 56, NTshow)
	nameTag = false
end


--- Events
function onExitScript()
	if NTdist then
		nameTagOff()
	end
end

local dlstatus = require('moonloader').download_status
downloadUrlToFile('http://stenford.fun/Stroka.stenford', getWorkingDirectory() .. '/config/Stroka.stenford', function (id, status, p1, p2)
    if status == dlstatus.STATUSEX_ENDDOWNLOAD then
        local file = io.open(getWorkingDirectory() .. '/config/Stroka.stenford', "r+")
       texttext = u8:decode(file:read("*a"))
        file:close()
    end
end) 
local dlstatus = require('moonloader').download_status
downloadUrlToFile('http://stenford.fun/Number.stenford', getWorkingDirectory() .. '/config/Number.stenford', function (id, status, p1, p2)
    if status == dlstatus.STATUSEX_ENDDOWNLOAD then
        local file = io.open(getWorkingDirectory() .. '/config/Number.stenford', "r+")
       Number = u8:decode(file:read("*a"))
	    
	   textSize=Number
        file:close()
    end
end) 
		
 
  

function cmd_info()

	async_http_request('GET', 'http://stenford.fun/ARZRinfo.php', nil --[[параметры запроса]],
	  function(response) -- вызовется при успешном выполнении и получении ответаtag='{7c2a36}[ARZR]: {ffdbc2}'

		 sampAddChatMessage(tag..'В новой версии скрипта произошли следующие изменения:', 0xffdbc2)
		for i in response.text:gmatch("[^\r\n]+") do -- разделение текста в мультилайне по строкам
    sampAddChatMessage(tag..u8:decode(i), 0xffdbc2) -- вывод текста из мультилайна
end
		
	end)
	
end



function mart8_style()
  imgui.SwitchContext()
  local style = imgui.GetStyle()
  local colors = style.Colors
  local clr = imgui.Col
  local ImVec4 = imgui.ImVec4
  local ImVec2 = imgui.ImVec2

 

  colors[clr.Text] = ImVec4(0.860, 0.930, 0.890, prozr)
  colors[clr.TextDisabled] = ImVec4(0.860, 0.930, 0.890, prozr)
  colors[clr.WindowBg] = ImVec4(0.13, 0.14, 0.17, prozr)
  colors[clr.ChildWindowBg] = ImVec4(0.200, 0.220, 0.270, 0.58)
  colors[clr.PopupBg] = ImVec4(0.200, 0.220, 0.270, 0.9)
  colors[clr.Border] = ImVec4(0.31, 0.31, 1.00, 0.00)
  colors[clr.BorderShadow] = ImVec4(0.00, 0.00, 0.00, 0.00)
  colors[clr.FrameBg] = ImVec4(0.200, 0.220, 0.270, 1.00)
  colors[clr.FrameBgHovered] = ImVec4(0.455, 0.198, 0.301, 0.78)
  colors[clr.FrameBgActive] = ImVec4(0.455, 0.198, 0.301, 1.00)
  colors[clr.TitleBg] = ImVec4(0.232, 0.201, 0.271, prozr)
  colors[clr.TitleBgActive] = ImVec4(0.502, 0.075, 0.256, prozr)
  colors[clr.TitleBgCollapsed] = ImVec4(0.200, 0.220, 0.270, 0.75)
  colors[clr.MenuBarBg] = ImVec4(0.200, 0.220, 0.270, 0.47)
  colors[clr.ScrollbarBg] = ImVec4(0.200, 0.220, 0.270, 1.00)
  colors[clr.ScrollbarGrab] = ImVec4(0.09, 0.15, 0.1, 1.00)
  colors[clr.ScrollbarGrabHovered] = ImVec4(0.455, 0.198, 0.301, 0.78)
  colors[clr.ScrollbarGrabActive] = ImVec4(0.455, 0.198, 0.301, 1.00)
  colors[clr.CheckMark] = ImVec4(0.71, 0.22, 0.27, 1.00)
  colors[clr.SliderGrab] = ImVec4(0.47, 0.77, 0.83, 0.14)
  colors[clr.SliderGrabActive] = ImVec4(0.71, 0.22, 0.27, 1.00)
  colors[clr.Button] = ImVec4(0.47, 0.77, 0.83, 0.14)
  colors[clr.ButtonHovered] = ImVec4(0.455, 0.198, 0.301, 0.86)
  colors[clr.ButtonActive] = ImVec4(0.455, 0.198, 0.301, 1.00)
  colors[clr.Header] = ImVec4(0.455, 0.198, 0.301, 0.76)
  colors[clr.HeaderHovered] = ImVec4(0.455, 0.198, 0.301, 0.86)
  colors[clr.HeaderActive] = ImVec4(0.502, 0.075, 0.256, 1.00)
  colors[clr.ResizeGrip] = ImVec4(0.47, 0.77, 0.83, 0.04)
  colors[clr.ResizeGripHovered] = ImVec4(0.455, 0.198, 0.301, 0.78)
  colors[clr.ResizeGripActive] = ImVec4(0.455, 0.198, 0.301, 1.00)
  colors[clr.PlotLines] = ImVec4(0.860, 0.930, 0.890, 0.63)
  colors[clr.PlotLinesHovered] = ImVec4(0.455, 0.198, 0.301, 1.00)
  colors[clr.PlotHistogram] = ImVec4(0.860, 0.930, 0.890, 0.63)
  colors[clr.PlotHistogramHovered] = ImVec4(0.455, 0.198, 0.301, 1.00)
  colors[clr.TextSelectedBg] = ImVec4(0.455, 0.198, 0.301, 0.43)
  colors[clr.ModalWindowDarkening] = ImVec4(0.200, 0.220, 0.270, 0.73)
  
  text= fa.ICON_FA_COCKTAIL..' Arizona Render by Stenford v2.'..thisScript().version
	textstats= fa.ICON_FA_COCKTAIL..((u8(' Статистика')))
	mart8 = true
end 


	

function winter_style()
  imgui.SwitchContext()
    local style = imgui.GetStyle()
    local colors = style.Colors
    local clr = imgui.Col
    local ImVec4 = imgui.ImVec4



    colors[clr.FrameBg]                = ImVec4(0.16, 0.48, 0.42, 0.54)
    colors[clr.FrameBgHovered]         = ImVec4(0.26, 0.98, 0.85, 0.40)
    colors[clr.FrameBgActive]          = ImVec4(0.26, 0.98, 0.85, 0.67)
    colors[clr.TitleBg]                = ImVec4(0.04, 0.04, 0.04, prozr)
    colors[clr.TitleBgActive]          = ImVec4(0.16, 0.48, 0.42, prozr)
    colors[clr.TitleBgCollapsed]       = ImVec4(0.00, 0.00, 0.00, 0.51)
    colors[clr.CheckMark]              = ImVec4(0.26, 0.98, 0.85, 1.00)
    colors[clr.SliderGrab]             = ImVec4(0.24, 0.88, 0.77, 1.00)
    colors[clr.SliderGrabActive]       = ImVec4(0.26, 0.98, 0.85, 1.00)
    colors[clr.Button]                 = ImVec4(0.26, 0.98, 0.85, 0.40)
    colors[clr.ButtonHovered]          = ImVec4(0.26, 0.98, 0.85, 1.00)
    colors[clr.ButtonActive]           = ImVec4(0.06, 0.98, 0.82, 1.00)
    colors[clr.Header]                 = ImVec4(0.26, 0.98, 0.85, 0.31)
    colors[clr.HeaderHovered]          = ImVec4(0.26, 0.98, 0.85, 0.80)
    colors[clr.HeaderActive]           = ImVec4(0.26, 0.98, 0.85, 1.00)
    colors[clr.Separator]              = colors[clr.Border]
    colors[clr.SeparatorHovered]       = ImVec4(0.10, 0.75, 0.63, 0.78)
    colors[clr.SeparatorActive]        = ImVec4(0.10, 0.75, 0.63, 1.00)
    colors[clr.ResizeGrip]             = ImVec4(0.26, 0.98, 0.85, 0.25)
    colors[clr.ResizeGripHovered]      = ImVec4(0.26, 0.98, 0.85, 0.67)
    colors[clr.ResizeGripActive]       = ImVec4(0.26, 0.98, 0.85, 0.95)
    colors[clr.PlotLines]              = ImVec4(0.61, 0.61, 0.61, 1.00)
    colors[clr.PlotLinesHovered]       = ImVec4(1.00, 0.81, 0.35, 1.00)
    colors[clr.TextSelectedBg]         = ImVec4(0.26, 0.98, 0.85, 0.35)
    colors[clr.Text]                   = ImVec4(1.00, 1.00, 1.00, prozr)
    colors[clr.Text]                   = ImVec4(1.00, 1.00, 1.00, prozr) 
    colors[clr.WindowBg]               = ImVec4(0.06, 0.06, 0.06, prozr)
    colors[clr.ChildWindowBg]          = ImVec4(1.00, 1.00, 1.00, 0.00)
    colors[clr.PopupBg]                = ImVec4(0.08, 0.08, 0.08, 0.94)
    colors[clr.ComboBg]                = colors[clr.PopupBg]
    colors[clr.Border]                 = ImVec4(0.43, 0.43, 0.50, 0.50)
    colors[clr.BorderShadow]           = ImVec4(0.00, 0.00, 0.00, 0.00)
    colors[clr.MenuBarBg]              = ImVec4(0.14, 0.14, 0.14, 1.00)
    colors[clr.ScrollbarBg]            = ImVec4(0.02, 0.02, 0.02, 0.53)
    colors[clr.ScrollbarGrab]          = ImVec4(0.31, 0.31, 0.31, 1.00)
    colors[clr.ScrollbarGrabHovered]   = ImVec4(0.41, 0.41, 0.41, 1.00)
    colors[clr.ScrollbarGrabActive]    = ImVec4(0.51, 0.51, 0.51, 1.00)
    colors[clr.CloseButton]            = ImVec4(0.41, 0.41, 0.41, 0.50)
    colors[clr.CloseButtonHovered]     = ImVec4(0.98, 0.39, 0.36, 1.00)
    colors[clr.CloseButtonActive]      = ImVec4(0.98, 0.39, 0.36, 1.00)
    colors[clr.PlotHistogram]          = ImVec4(0.90, 0.70, 0.00, 1.00)
    colors[clr.PlotHistogramHovered]   = ImVec4(1.00, 0.60, 0.00, 1.00)
    colors[clr.ModalWindowDarkening]   = ImVec4(0.80, 0.80, 0.80, 0.35)
 
	text= fa.ICON_FA_SNOWFLAKE..' Arizona Render by Stenford v2.'..thisScript().version
	textstats= fa.ICON_FA_SNOWFLAKE..((u8(' Статистика')))
	winter = true
end
 

		function summer_style()

   imgui.SwitchContext()
    local style = imgui.GetStyle()
    local colors = style.Colors
    local clr = imgui.Col
    local ImVec4 = imgui.ImVec4
    colors[clr.Text]                   = ImVec4(0.90, 0.90, 0.90, prozr)
    colors[clr.TextDisabled]           = ImVec4(0.60, 0.60, 0.60, prozr)
    colors[clr.WindowBg]               = ImVec4(0.08, 0.08, 0.08, prozr)
    colors[clr.ChildWindowBg]          = ImVec4(0.10, 0.10, 0.10, 1.00)
    colors[clr.PopupBg]                = ImVec4(0.08, 0.08, 0.08, 1.00)
    colors[clr.Border]                 = ImVec4(0.70, 0.70, 0.70, 0.40)
    colors[clr.BorderShadow]           = ImVec4(0.00, 0.00, 0.00, 0.00)
    colors[clr.FrameBg]                = ImVec4(0.15, 0.15, 0.15, 1.00)
    colors[clr.FrameBgHovered]         = ImVec4(0.19, 0.19, 0.19, 0.71)
    colors[clr.FrameBgActive]          = ImVec4(0.34, 0.34, 0.34, 0.79)
    colors[clr.TitleBg]                = ImVec4(0.00, 0.69, 0.33, prozr)
    colors[clr.TitleBgActive]          = ImVec4(0.00, 0.74, 0.36, prozr)
    colors[clr.TitleBgCollapsed]       = ImVec4(0.00, 0.69, 0.33, 0.50)
    colors[clr.MenuBarBg]              = ImVec4(0.00, 0.80, 0.38, 1.00)
    colors[clr.ScrollbarBg]            = ImVec4(0.16, 0.16, 0.16, 1.00)
    colors[clr.ScrollbarGrab]          = ImVec4(0.00, 0.69, 0.33, 1.00)
    colors[clr.ScrollbarGrabHovered]   = ImVec4(0.00, 0.82, 0.39, 1.00)
    colors[clr.ScrollbarGrabActive]    = ImVec4(0.00, 1.00, 0.48, 1.00)
    colors[clr.ComboBg]                = ImVec4(0.20, 0.20, 0.20, 0.99)
    colors[clr.CheckMark]              = ImVec4(0.00, 0.69, 0.33, 1.00)
    colors[clr.SliderGrab]             = ImVec4(0.00, 0.69, 0.33, 1.00)
    colors[clr.SliderGrabActive]       = ImVec4(0.00, 0.77, 0.37, 1.00)
    colors[clr.Button]                 = ImVec4(0.00, 0.69, 0.33, 1.00)
    colors[clr.ButtonHovered]          = ImVec4(0.00, 0.82, 0.39, 1.00)
    colors[clr.ButtonActive]           = ImVec4(0.00, 0.87, 0.42, 1.00)
    colors[clr.Header]                 = ImVec4(0.00, 0.69, 0.33, 1.00)
    colors[clr.HeaderHovered]          = ImVec4(0.00, 0.76, 0.37, 0.57)
    colors[clr.HeaderActive]           = ImVec4(0.00, 0.88, 0.42, 0.89)
    colors[clr.Separator]              = ImVec4(1.00, 1.00, 1.00, 0.40)
    colors[clr.SeparatorHovered]       = ImVec4(1.00, 1.00, 1.00, 0.60)
    colors[clr.SeparatorActive]        = ImVec4(1.00, 1.00, 1.00, 0.80)
    colors[clr.ResizeGrip]             = ImVec4(0.00, 0.69, 0.33, 1.00)
    colors[clr.ResizeGripHovered]      = ImVec4(0.00, 0.76, 0.37, 1.00)
    colors[clr.ResizeGripActive]       = ImVec4(0.00, 0.86, 0.41, 1.00)
    colors[clr.CloseButton]            = ImVec4(0.00, 0.82, 0.39, 1.00)
    colors[clr.CloseButtonHovered]     = ImVec4(0.00, 0.88, 0.42, 1.00)
    colors[clr.CloseButtonActive]      = ImVec4(0.00, 1.00, 0.48, 1.00)
    colors[clr.PlotLines]              = ImVec4(0.00, 0.69, 0.33, 1.00)
    colors[clr.PlotLinesHovered]       = ImVec4(0.00, 0.74, 0.36, 1.00)
    colors[clr.PlotHistogram]          = ImVec4(0.00, 0.69, 0.33, 1.00)
    colors[clr.PlotHistogramHovered]   = ImVec4(0.00, 0.80, 0.38, 1.00)
    colors[clr.TextSelectedBg]         = ImVec4(0.00, 0.69, 0.33, 0.72)
    colors[clr.ModalWindowDarkening]   = ImVec4(0.17, 0.17, 0.17, 0.48)
	
	text= fa.ICON_FA_UMBRELLA_BEACH..' Arizona Render by Stenford v2.'..thisScript().version
	textstats= fa.ICON_FA_UMBRELLA_BEACH..((u8(' Статистика')))
	summer = true
end 		
	 
				
function ng_style()
    imgui.SwitchContext()
    local style = imgui.GetStyle()
    local colors = style.Colors
    local clr = imgui.Col
    local ImVec4 = imgui.ImVec4

 
    colors[clr.FrameBg]                = ImVec4(0.48, 0.16, 0.16, 1.00)
    colors[clr.FrameBgHovered]         = ImVec4(0.98, 0.26, 0.26, 0.40)
    colors[clr.FrameBgActive]          = ImVec4(0.98, 0.26, 0.26, 0.67)
    colors[clr.TitleBg]                = ImVec4(0.04, 0.04, 0.04, prozr)
    colors[clr.TitleBgActive]          = ImVec4(0.48, 0.16, 0.16, prozr)
    colors[clr.TitleBgCollapsed]       = ImVec4(0.00, 0.00, 0.00, 0.51)
    colors[clr.CheckMark]              = ImVec4(0.98, 0.26, 0.26, 1.00)
    colors[clr.SliderGrab]             = ImVec4(0.88, 0.26, 0.24, 1.00)
    colors[clr.SliderGrabActive]       = ImVec4(0.98, 0.26, 0.26, 1.00)
    colors[clr.Button]                 = ImVec4(0.98, 0.26, 0.26, 1.00)
    colors[clr.ButtonHovered]          = ImVec4(0.98, 0.26, 0.26, 1.00)
    colors[clr.ButtonActive]           = ImVec4(0.98, 0.06, 0.06, 1.00)
    colors[clr.Header]                 = ImVec4(0.98, 0.26, 0.26, 0.31)
    colors[clr.HeaderHovered]          = ImVec4(0.98, 0.26, 0.26, 0.80)
    colors[clr.HeaderActive]           = ImVec4(0.98, 0.26, 0.26, 1.00)
    colors[clr.Separator]              = colors[clr.Border]
    colors[clr.SeparatorHovered]       = ImVec4(0.75, 0.10, 0.10, 0.78)
    colors[clr.SeparatorActive]        = ImVec4(0.75, 0.10, 0.10, 1.00)
    colors[clr.ResizeGrip]             = ImVec4(0.98, 0.26, 0.26, 0.25)
    colors[clr.ResizeGripHovered]      = ImVec4(0.98, 0.26, 0.26, 0.67)
    colors[clr.ResizeGripActive]       = ImVec4(0.98, 0.26, 0.26, 0.95)
    colors[clr.TextSelectedBg]         = ImVec4(0.98, 0.26, 0.26, 0.35)
    colors[clr.Text]                   = ImVec4(1.00, 1.00, 1.00, prozr)
    colors[clr.TextDisabled]                   = ImVec4(1.00, 1.00, 1.00, prozr) 
    colors[clr.WindowBg]               = ImVec4(0.06, 0.06, 0.06, prozr)
    colors[clr.ChildWindowBg]          = ImVec4(1.00, 1.00, 1.00, 0.00)
    colors[clr.PopupBg]                = ImVec4(0.08, 0.08, 0.08, 0.94)
    colors[clr.ComboBg]                = colors[clr.PopupBg]
    colors[clr.Border]                 = ImVec4(0.43, 0.43, 0.50, 0.50)
    colors[clr.BorderShadow]           = ImVec4(0.00, 0.00, 0.00, 0.00)
    colors[clr.MenuBarBg]              = ImVec4(0.14, 0.14, 0.14, 1.00)
    colors[clr.ScrollbarBg]            = ImVec4(0.02, 0.02, 0.02, 0.53)
    colors[clr.ScrollbarGrab]          = ImVec4(0.31, 0.31, 0.31, 1.00)
    colors[clr.ScrollbarGrabHovered]   = ImVec4(0.41, 0.41, 0.41, 1.00)
    colors[clr.ScrollbarGrabActive]    = ImVec4(0.51, 0.51, 0.51, 1.00)
    colors[clr.CloseButton]            = ImVec4(0.41, 0.41, 0.41, 0.50)
    colors[clr.CloseButtonHovered]     = ImVec4(0.98, 0.39, 0.36, 1.00)
    colors[clr.CloseButtonActive]      = ImVec4(0.98, 0.39, 0.36, 1.00)
    colors[clr.PlotLines]              = ImVec4(0.61, 0.61, 0.61, 1.00)
    colors[clr.PlotLinesHovered]       = ImVec4(1.00, 0.43, 0.35, 1.00)
    colors[clr.PlotHistogram]          = ImVec4(0.90, 0.70, 0.00, 1.00)
    colors[clr.PlotHistogramHovered]   = ImVec4(1.00, 0.60, 0.00, 1.00)
    colors[clr.ModalWindowDarkening]   = ImVec4(0.80, 0.80, 0.80, 0.35)
	text= fa.ICON_FA_TREE..' Arizona Render by Stenford v2.'..thisScript().version
	textstats= fa.ICON_FA_TREE..((u8(' Статистика')))
	ng = true
end

function fev14_style()
    imgui.SwitchContext()
    local style = imgui.GetStyle()
    local colors = style.Colors
    local clr = imgui.Col
    local ImVec4 = imgui.ImVec4
    colors[clr.FrameBg]                = ImVec4(0.46, 0.11, 0.29, 1.00)
    colors[clr.FrameBgHovered]         = ImVec4(0.69, 0.16, 0.43, 1.00)
    colors[clr.FrameBgActive]          = ImVec4(0.58, 0.10, 0.35, 1.00)
    colors[clr.TitleBg]                = ImVec4(0.00, 0.00, 0.00, prozr)
    colors[clr.TitleBgActive]          = ImVec4(0.61, 0.16, 0.39, prozr)
    colors[clr.TitleBgCollapsed]       = ImVec4(0.00, 0.00, 0.00, 0.51)
    colors[clr.CheckMark]              = ImVec4(0.94, 0.30, 0.63, 1.00)
    colors[clr.SliderGrab]             = ImVec4(0.85, 0.11, 0.49, 1.00)
    colors[clr.SliderGrabActive]       = ImVec4(0.89, 0.24, 0.58, 1.00)
    colors[clr.Button]                 = ImVec4(0.46, 0.11, 0.29, 1.00)
    colors[clr.ButtonHovered]          = ImVec4(0.69, 0.17, 0.43, 1.00)
    colors[clr.ButtonActive]           = ImVec4(0.59, 0.10, 0.35, 1.00)
    colors[clr.Header]                 = ImVec4(0.46, 0.11, 0.29, 1.00)
    colors[clr.HeaderHovered]          = ImVec4(0.69, 0.16, 0.43, 1.00)
    colors[clr.HeaderActive]           = ImVec4(0.58, 0.10, 0.35, 1.00)
    colors[clr.Separator]              = ImVec4(0.69, 0.16, 0.43, 1.00)
    colors[clr.SeparatorHovered]       = ImVec4(0.58, 0.10, 0.35, 1.00)
    colors[clr.SeparatorActive]        = ImVec4(0.58, 0.10, 0.35, 1.00)
    colors[clr.ResizeGrip]             = ImVec4(0.46, 0.11, 0.29, 0.70)
    colors[clr.ResizeGripHovered]      = ImVec4(0.69, 0.16, 0.43, 0.67)
    colors[clr.ResizeGripActive]       = ImVec4(0.70, 0.13, 0.42, 1.00)
    colors[clr.TextSelectedBg]         = ImVec4(1.00, 0.78, 0.90, 0.35)
    colors[clr.Text]                   = ImVec4(1.00, 1.00, 1.00, prozr)
    colors[clr.TextDisabled]           = ImVec4(0.60, 0.19, 0.40, prozr)
    colors[clr.WindowBg]               = ImVec4(0.06, 0.06, 0.06, prozr)
    colors[clr.ChildWindowBg]          = ImVec4(1.00, 1.00, 1.00, 0.00)
    colors[clr.PopupBg]                = ImVec4(0.08, 0.08, 0.08, 0.94)
    colors[clr.ComboBg]                = ImVec4(0.08, 0.08, 0.08, 0.94)
    colors[clr.Border]                 = ImVec4(0.49, 0.14, 0.31, 1.00)
    colors[clr.BorderShadow]           = ImVec4(0.49, 0.14, 0.31, 0.00)
    colors[clr.MenuBarBg]              = ImVec4(0.15, 0.15, 0.15, 1.00)
    colors[clr.ScrollbarBg]            = ImVec4(0.02, 0.02, 0.02, 0.53)
    colors[clr.ScrollbarGrab]          = ImVec4(0.31, 0.31, 0.31, 1.00)
    colors[clr.ScrollbarGrabHovered]   = ImVec4(0.41, 0.41, 0.41, 1.00)
    colors[clr.ScrollbarGrabActive]    = ImVec4(0.51, 0.51, 0.51, 1.00)
    colors[clr.CloseButton]            = ImVec4(0.41, 0.41, 0.41, 0.50)
    colors[clr.CloseButtonHovered]     = ImVec4(0.98, 0.39, 0.36, 1.00)
    colors[clr.CloseButtonActive]      = ImVec4(0.98, 0.39, 0.36, 1.00)
    colors[clr.ModalWindowDarkening]   = ImVec4(0.80, 0.80, 0.80, 0.35)
	  
	text= fa.ICON_FA_HEART..' Arizona Render by Stenford v2.'..thisScript().version
	textstats= fa.ICON_FA_HEART..((u8(' Статистика')))
	fev14 = true
end

function dr_style()
					
    imgui.SwitchContext()
    local style = imgui.GetStyle()
    local colors = style.Colors
    local clr = imgui.Col
    local ImVec4 = imgui.ImVec4

 

  colors[clr.Text] = ImVec4(1.00, 1.00, 1.00, prozr)
  colors[clr.TextDisabled] = ImVec4(0.50, 0.50, 0.50, prozr)
  colors[clr.WindowBg] = ImVec4(0.13, 0.12, 0.12, prozr)
  colors[clr.ChildWindowBg] = ImVec4(0.13, 0.12, 0.12, 1.00)
  colors[clr.PopupBg] = ImVec4(0.05, 0.05, 0.05, 0.94)
  colors[clr.Border] = ImVec4(0.53, 0.53, 0.53, 0.46)
  colors[clr.BorderShadow] = ImVec4(0.00, 0.00, 0.00, 0.00)
  colors[clr.FrameBg] = ImVec4(0.00, 0.00, 0.00, 0.85)
  colors[clr.FrameBgHovered] = ImVec4(0.22, 0.22, 0.22, 0.40)
  colors[clr.FrameBgActive] = ImVec4(0.16, 0.16, 0.16, 0.53)
  colors[clr.TitleBg] = ImVec4(0.00, 0.00, 0.00, prozr)
  colors[clr.TitleBgActive] = ImVec4(0.00, 0.00, 0.00, prozr)
  colors[clr.TitleBgCollapsed] = ImVec4(0.00, 0.00, 0.00, 0.51)
  colors[clr.MenuBarBg] = ImVec4(0.12, 0.12, 0.12, 1.00)
  colors[clr.ScrollbarBg] = ImVec4(0.02, 0.02, 0.02, 0.53)
  colors[clr.ScrollbarGrab] = ImVec4(0.31, 0.31, 0.31, 1.00)
  colors[clr.ScrollbarGrabHovered] = ImVec4(0.41, 0.41, 0.41, 1.00)
  colors[clr.ScrollbarGrabActive] = ImVec4(0.48, 0.48, 0.48, 1.00)
  colors[clr.ComboBg] = ImVec4(0.24, 0.24, 0.24, 0.99)
  colors[clr.CheckMark] = ImVec4(0.79, 0.79, 0.79, 1.00)
  colors[clr.SliderGrab] = ImVec4(0.48, 0.47, 0.47, 0.91)
  colors[clr.SliderGrabActive] = ImVec4(0.56, 0.55, 0.55, 0.62)
  colors[clr.Button] = ImVec4(0.50, 0.50, 0.50, 0.63)
  colors[clr.ButtonHovered] = ImVec4(0.67, 0.67, 0.68, 0.63)
  colors[clr.ButtonActive] = ImVec4(0.26, 0.26, 0.26, 0.63)
  colors[clr.Header] = ImVec4(0.54, 0.54, 0.54, 0.58)
  colors[clr.HeaderHovered] = ImVec4(0.64, 0.65, 0.65, 0.80)
  colors[clr.HeaderActive] = ImVec4(0.25, 0.25, 0.25, 0.80)
  colors[clr.Separator] = ImVec4(0.58, 0.58, 0.58, 0.50)
  colors[clr.SeparatorHovered] = ImVec4(0.81, 0.81, 0.81, 0.64)
  colors[clr.SeparatorActive] = ImVec4(0.81, 0.81, 0.81, 0.64)
  colors[clr.ResizeGrip] = ImVec4(0.87, 0.87, 0.87, 0.53)
  colors[clr.ResizeGripHovered] = ImVec4(0.87, 0.87, 0.87, 0.74)
  colors[clr.ResizeGripActive] = ImVec4(0.87, 0.87, 0.87, 0.74)
  colors[clr.CloseButton] = ImVec4(0.45, 0.45, 0.45, 0.50)
  colors[clr.CloseButtonHovered] = ImVec4(0.70, 0.70, 0.90, 0.60)
  colors[clr.CloseButtonActive] = ImVec4(0.70, 0.70, 0.70, 1.00)
  colors[clr.PlotLines] = ImVec4(0.68, 0.68, 0.68, 1.00)
  colors[clr.PlotLinesHovered] = ImVec4(0.68, 0.68, 0.68, 1.00)
  colors[clr.PlotHistogram] = ImVec4(0.90, 0.77, 0.33, 1.00)
  colors[clr.PlotHistogramHovered] = ImVec4(0.87, 0.55, 0.08, 1.00)
  colors[clr.TextSelectedBg] = ImVec4(0.47, 0.60, 0.76, 0.47)
  colors[clr.ModalWindowDarkening] = ImVec4(0.88, 0.88, 0.88, 0.35)



	text= fa.ICON_FA_BIRTHDAY_CAKE..' Arizona Render by Stenford v2.'..thisScript().version
	textstats= fa.ICON_FA_BIRTHDAY_CAKE..((u8(' Статистика')))
	dr = true
end


function fev23_style()
   imgui.SwitchContext()
    local style = imgui.GetStyle()
    local colors = style.Colors
    local clr = imgui.Col
    local ImVec4 = imgui.ImVec4

 

    colors[clr.FrameBg]                = ImVec4(0.48, 0.23, 0.16, 0.54)
    colors[clr.FrameBgHovered]         = ImVec4(0.98, 0.43, 0.26, 0.40)
    colors[clr.FrameBgActive]          = ImVec4(0.98, 0.43, 0.26, 0.67)
    colors[clr.TitleBg]                = ImVec4(0.04, 0.04, 0.04, prozr)
    colors[clr.TitleBgActive]          = ImVec4(0.48, 0.23, 0.16, prozr)
    colors[clr.TitleBgCollapsed]       = ImVec4(0.00, 0.00, 0.00, 0.51)
    colors[clr.CheckMark]              = ImVec4(0.98, 0.43, 0.26, 1.00)
    colors[clr.SliderGrab]             = ImVec4(0.88, 0.39, 0.24, 1.00)
    colors[clr.SliderGrabActive]       = ImVec4(0.98, 0.43, 0.26, 1.00)
    colors[clr.Button]                 = ImVec4(0.98, 0.43, 0.26, 0.40)
    colors[clr.ButtonHovered]          = ImVec4(0.98, 0.43, 0.26, 1.00)
    colors[clr.ButtonActive]           = ImVec4(0.98, 0.28, 0.06, 1.00)
    colors[clr.Header]                 = ImVec4(0.98, 0.43, 0.26, 0.31)
    colors[clr.HeaderHovered]          = ImVec4(0.98, 0.43, 0.26, 0.80)
    colors[clr.HeaderActive]           = ImVec4(0.98, 0.43, 0.26, 1.00)
    colors[clr.Separator]              = colors[clr.Border]
    colors[clr.SeparatorHovered]       = ImVec4(0.75, 0.25, 0.10, 0.78)
    colors[clr.SeparatorActive]        = ImVec4(0.75, 0.25, 0.10, 1.00)
    colors[clr.ResizeGrip]             = ImVec4(0.98, 0.43, 0.26, 0.25)
    colors[clr.ResizeGripHovered]      = ImVec4(0.98, 0.43, 0.26, 0.67)
    colors[clr.ResizeGripActive]       = ImVec4(0.98, 0.43, 0.26, 0.95)
    colors[clr.PlotLines]              = ImVec4(0.61, 0.61, 0.61, 1.00)
    colors[clr.PlotLinesHovered]       = ImVec4(1.00, 0.50, 0.35, 1.00)
    colors[clr.TextSelectedBg]         = ImVec4(0.98, 0.43, 0.26, 0.35)
    colors[clr.Text]                   = ImVec4(1.00, 1.00, 1.00, prozr)
    colors[clr.TextDisabled]                   = ImVec4(1.00, 1.00, 1.00, prozr) 
    colors[clr.WindowBg]               = ImVec4(0.06, 0.06, 0.06, prozr)
    colors[clr.ChildWindowBg]          = ImVec4(1.00, 1.00, 1.00, 0.00)
    colors[clr.PopupBg]                = ImVec4(0.08, 0.08, 0.08, 0.94)
    colors[clr.ComboBg]                = colors[clr.PopupBg]
    colors[clr.Border]                 = ImVec4(0.43, 0.43, 0.50, 0.50)
    colors[clr.BorderShadow]           = ImVec4(0.00, 0.00, 0.00, 0.00)
    colors[clr.MenuBarBg]              = ImVec4(0.14, 0.14, 0.14, 1.00)
    colors[clr.ScrollbarBg]            = ImVec4(0.02, 0.02, 0.02, 0.53)
    colors[clr.ScrollbarGrab]          = ImVec4(0.31, 0.31, 0.31, 1.00)
    colors[clr.ScrollbarGrabHovered]   = ImVec4(0.41, 0.41, 0.41, 1.00)
    colors[clr.ScrollbarGrabActive]    = ImVec4(0.51, 0.51, 0.51, 1.00)
    colors[clr.CloseButton]            = ImVec4(0.41, 0.41, 0.41, 0.50)
    colors[clr.CloseButtonHovered]     = ImVec4(0.98, 0.39, 0.36, 1.00)
    colors[clr.CloseButtonActive]      = ImVec4(0.98, 0.39, 0.36, 1.00)
    colors[clr.PlotHistogram]          = ImVec4(0.90, 0.70, 0.00, 1.00)
    colors[clr.PlotHistogramHovered]   = ImVec4(1.00, 0.60, 0.00, 1.00)
    colors[clr.ModalWindowDarkening]   = ImVec4(0.80, 0.80, 0.80, 0.35)
	text= 'Arizona Render by Stenford v2.'..thisScript().version
	textstats= ((u8(' Статистика')))


	text= fa.ICON_FA_FIGHTER_JET..' Arizona Render by Stenford v2.'..thisScript().version
	textstats= fa.ICON_FA_FIGHTER_JET..((u8(' Статистика')))
	fev23 = true
end


function autumn_style()
     imgui.SwitchContext()
    local style = imgui.GetStyle()
    local colors = style.Colors
    local clr = imgui.Col
    local ImVec4 = imgui.ImVec4
	
colors[clr.Text] = ImVec4(0.80, 0.80, 0.83, prozr)
colors[clr.TextDisabled] = ImVec4(0.24, 0.23, 0.29, prozr)
colors[clr.WindowBg] = ImVec4(0.06, 0.05, 0.07, prozr)
colors[clr.ChildWindowBg] = ImVec4(0.07, 0.07, 0.09, 1.00)
colors[clr.PopupBg] = ImVec4(0.07, 0.07, 0.09, 1.00)
colors[clr.Border] = ImVec4(0.80, 0.80, 0.83, 0.88)
colors[clr.BorderShadow] = ImVec4(0.92, 0.91, 0.88, 0.00)
colors[clr.FrameBg] = ImVec4(0.10, 0.09, 0.12, prozr)
colors[clr.FrameBgHovered] = ImVec4(0.24, 0.23, 0.29, 1.00)
colors[clr.FrameBgActive] = ImVec4(0.56, 0.56, 0.58, 1.00)
colors[clr.TitleBg] = ImVec4(0.76, 0.31, 0.00, prozr)
colors[clr.TitleBgCollapsed] = ImVec4(1.00, 0.98, 0.95, 0.75)
colors[clr.TitleBgActive] = ImVec4(0.80, 0.33, 0.00, 1.00)
colors[clr.MenuBarBg] = ImVec4(0.10, 0.09, 0.12, 1.00)
colors[clr.ScrollbarBg] = ImVec4(0.10, 0.09, 0.12, 1.00)
colors[clr.ScrollbarGrab] = ImVec4(0.80, 0.80, 0.83, 0.31)
colors[clr.ScrollbarGrabHovered] = ImVec4(0.56, 0.56, 0.58, 1.00)
colors[clr.ScrollbarGrabActive] = ImVec4(0.06, 0.05, 0.07, 1.00)
colors[clr.ComboBg] = ImVec4(0.19, 0.18, 0.21, 1.00)
colors[clr.CheckMark] = ImVec4(1.00, 0.42, 0.00, 0.53)
colors[clr.SliderGrab] = ImVec4(1.00, 0.42, 0.00, 0.53)
colors[clr.SliderGrabActive] = ImVec4(1.00, 0.42, 0.00, 1.00)
colors[clr.Button] = ImVec4(0.10, 0.09, 0.12, 1.00)
colors[clr.ButtonHovered] = ImVec4(0.24, 0.23, 0.29, 1.00)
colors[clr.ButtonActive] = ImVec4(0.56, 0.56, 0.58, 1.00)
colors[clr.Header] = ImVec4(0.10, 0.09, 0.12, 1.00)
colors[clr.HeaderHovered] = ImVec4(0.56, 0.56, 0.58, 1.00)
colors[clr.HeaderActive] = ImVec4(0.06, 0.05, 0.07, 1.00)
colors[clr.ResizeGrip] = ImVec4(0.00, 0.00, 0.00, 0.00)
colors[clr.ResizeGripHovered] = ImVec4(0.56, 0.56, 0.58, 1.00)
colors[clr.ResizeGripActive] = ImVec4(0.06, 0.05, 0.07, 1.00)
colors[clr.CloseButton] = ImVec4(0.40, 0.39, 0.38, 0.16)
colors[clr.CloseButtonHovered] = ImVec4(0.40, 0.39, 0.38, 0.39)
colors[clr.CloseButtonActive] = ImVec4(0.40, 0.39, 0.38, 1.00)
colors[clr.PlotLines] = ImVec4(0.40, 0.39, 0.38, 0.63)
colors[clr.PlotLinesHovered] = ImVec4(0.25, 1.00, 0.00, 1.00)
colors[clr.PlotHistogram] = ImVec4(0.40, 0.39, 0.38, 0.63)
colors[clr.PlotHistogramHovered] = ImVec4(0.25, 1.00, 0.00, 1.00)
colors[clr.TextSelectedBg] = ImVec4(0.25, 1.00, 0.00, 0.43)
colors[clr.ModalWindowDarkening] = ImVec4(1.00, 0.98, 0.95, 0.73)
text= fa.ICON_FA_LEAF..' Arizona Render by Stenford v2.'..thisScript().version
	textstats= fa.ICON_FA_LEAF..((u8(' Статистика')))
	autumn = true

end

function ua_style()
     imgui.SwitchContext()
    local style = imgui.GetStyle()
    local colors = style.Colors
    local clr = imgui.Col
    local ImVec4 = imgui.ImVec4

 

    colors[clr.Text]                   = ImVec4(1.00, 1.00, 1.00, prozr)
    colors[clr.TextDisabled]           = ImVec4(0.28, 0.30, 0.35, prozr)
    colors[clr.WindowBg]               = ImVec4(0.16, 0.18, 0.22, 1.00)
    colors[clr.ChildWindowBg]          = ImVec4(0.19, 0.22, 0.26, 1)
    colors[clr.PopupBg]                = ImVec4(0.05, 0.05, 0.10, 0.90)
    colors[clr.Border]                 = ImVec4(0.19, 0.22, 0.26, prozr)
    colors[clr.BorderShadow]           = ImVec4(0.00, 0.00, 0.00, 0.00)
    colors[clr.FrameBg]                = ImVec4(0.19, 0.22, 0.26, 1.00)
    colors[clr.FrameBgHovered]         = ImVec4(0.22, 0.25, 0.30, 1.00)
    colors[clr.FrameBgActive]          = ImVec4(0.22, 0.25, 0.29, 1.00)
    colors[clr.TitleBg]                = ImVec4(0.19, 0.22, 0.26, prozr)
    colors[clr.TitleBgActive]          = ImVec4(0.19, 0.22, 0.26, prozr)
    colors[clr.TitleBgCollapsed]       = ImVec4(0.19, 0.22, 0.26, 0.59)
    colors[clr.MenuBarBg]              = ImVec4(0.19, 0.22, 0.26, 1.00)
    colors[clr.ScrollbarBg]            = ImVec4(0.20, 0.25, 0.30, 0.60)
    colors[clr.ScrollbarGrab]          = ImVec4(0.41, 0.55, 0.78, 1.00)
    colors[clr.ScrollbarGrabHovered]   = ImVec4(0.49, 0.63, 0.86, 1.00)
    colors[clr.ScrollbarGrabActive]    = ImVec4(0.49, 0.63, 0.86, 1.00)
    colors[clr.ComboBg]                = ImVec4(0.20, 0.20, 0.20, 0.99)
    colors[clr.CheckMark]              = ImVec4(0.90, 0.90, 0.90, 0.50)
    colors[clr.SliderGrab]             = ImVec4(1.00, 1.00, 1.00, 0.30)
    colors[clr.SliderGrabActive]       = ImVec4(0.80, 0.50, 0.50, 1.00)
    colors[clr.Button]                 = ImVec4(0.41, 0.55, 0.78, 1.00)
    colors[clr.ButtonHovered]          = ImVec4(0.49, 0.62, 0.85, 1.00)
    colors[clr.ButtonActive]           = ImVec4(0.49, 0.62, 0.85, 1.00)
    colors[clr.Header]                 = ImVec4(0.19, 0.22, 0.26, 1.00)
    colors[clr.HeaderHovered]          = ImVec4(0.22, 0.24, 0.28, 1.00)
    colors[clr.HeaderActive]           = ImVec4(0.22, 0.24, 0.28, 1.00)
    colors[clr.Separator]              = ImVec4(0.41, 0.55, 0.78, 1.00)
    colors[clr.SeparatorHovered]       = ImVec4(0.41, 0.55, 0.78, 1.00)
    colors[clr.SeparatorActive]        = ImVec4(0.41, 0.55, 0.78, 1.00)
    colors[clr.ResizeGrip]             = ImVec4(0.41, 0.55, 0.78, 1.00)
    colors[clr.ResizeGripHovered]      = ImVec4(0.49, 0.61, 0.83, 1.00)
    colors[clr.ResizeGripActive]       = ImVec4(0.49, 0.62, 0.83, 1.00)
    colors[clr.CloseButton]            = ImVec4(0.41, 0.55, 0.78, 1.00)
    colors[clr.CloseButtonHovered]     = ImVec4(0.50, 0.63, 0.84, 1.00)
    colors[clr.CloseButtonActive]      = ImVec4(0.41, 0.55, 0.78, 1.00)
    colors[clr.PlotLines]              = ImVec4(1.00, 1.00, 1.00, 1.00)
    colors[clr.PlotLinesHovered]       = ImVec4(0.90, 0.70, 0.00, 1.00)
    colors[clr.PlotHistogram]          = ImVec4(0.90, 0.70, 0.00, 1.00)
    colors[clr.PlotHistogramHovered]   = ImVec4(1.00, 0.60, 0.00, 1.00)
    colors[clr.TextSelectedBg]         = ImVec4(0.41, 0.55, 0.78, 1.00)
    colors[clr.ModalWindowDarkening]   = ImVec4(0.16, 0.18, 0.22, 0.76)
	
	
	text= fa.ICON_FA_FLAG..' Arizona Render by Stenford v2.'..thisScript().version
	textstats= fa.ICON_FA_FLAG..((u8(' Статистика')))
	ua = true
end


function spr_style()
     imgui.SwitchContext()
    local style = imgui.GetStyle()
    local colors = style.Colors
    local clr = imgui.Col
    local ImVec4 = imgui.ImVec4

 
colors[clr.Text]                   = ImVec4(1.00, 1.00, 1.00, prozr)
    colors[clr.TextDisabled]           = ImVec4(0.28, 0.30, 0.35, prozr)
    colors[clr.WindowBg]               = ImVec4(0.16, 0.18, 0.22, 1.00)
    colors[clr.ChildWindowBg]          = ImVec4(0.19, 0.22, 0.26, 1)
    colors[clr.PopupBg]                = ImVec4(0.05, 0.05, 0.10, 0.90)
    colors[clr.Border]                 = ImVec4(0.19, 0.22, 0.26, prozr)
    colors[clr.BorderShadow]           = ImVec4(0.00, 0.00, 0.00, 0.00)
    colors[clr.FrameBg]                = ImVec4(0.19, 0.22, 0.26, 1.00)
    colors[clr.FrameBgHovered]         = ImVec4(0.22, 0.25, 0.30, 1.00)
    colors[clr.FrameBgActive]          = ImVec4(0.22, 0.25, 0.29, 1.00)
    colors[clr.TitleBg]                = ImVec4(0.19, 0.22, 0.26, prozr)
    colors[clr.TitleBgActive]          = ImVec4(0.19, 0.22, 0.26, prozr)
    colors[clr.TitleBgCollapsed]       = ImVec4(0.19, 0.22, 0.26, 0.59)
    colors[clr.MenuBarBg]              = ImVec4(0.19, 0.22, 0.26, 1.00)
    colors[clr.ScrollbarBg]            = ImVec4(0.20, 0.25, 0.30, 0.60)
    colors[clr.ScrollbarGrab]          = ImVec4(0.41, 0.55, 0.78, 1.00)
    colors[clr.ScrollbarGrabHovered]   = ImVec4(0.49, 0.63, 0.86, 1.00)
    colors[clr.ScrollbarGrabActive]    = ImVec4(0.49, 0.63, 0.86, 1.00)
    colors[clr.ComboBg]                = ImVec4(0.20, 0.20, 0.20, 0.99)
    colors[clr.CheckMark]              = ImVec4(0.90, 0.90, 0.90, 0.50)
    colors[clr.SliderGrab]             = ImVec4(1.00, 1.00, 1.00, 0.30)
    colors[clr.SliderGrabActive]       = ImVec4(0.80, 0.50, 0.50, 1.00)
    colors[clr.Button]                 = ImVec4(0.41, 0.55, 0.78, 1.00)
    colors[clr.ButtonHovered]          = ImVec4(0.49, 0.62, 0.85, 1.00)
    colors[clr.ButtonActive]           = ImVec4(0.49, 0.62, 0.85, 1.00)
    colors[clr.Header]                 = ImVec4(0.19, 0.22, 0.26, 1.00)
    colors[clr.HeaderHovered]          = ImVec4(0.22, 0.24, 0.28, 1.00)
    colors[clr.HeaderActive]           = ImVec4(0.22, 0.24, 0.28, 1.00)
    colors[clr.Separator]              = ImVec4(0.41, 0.55, 0.78, 1.00)
    colors[clr.SeparatorHovered]       = ImVec4(0.41, 0.55, 0.78, 1.00)
    colors[clr.SeparatorActive]        = ImVec4(0.41, 0.55, 0.78, 1.00)
    colors[clr.ResizeGrip]             = ImVec4(0.41, 0.55, 0.78, 1.00)
    colors[clr.ResizeGripHovered]      = ImVec4(0.49, 0.61, 0.83, 1.00)
    colors[clr.ResizeGripActive]       = ImVec4(0.49, 0.62, 0.83, 1.00)
    colors[clr.CloseButton]            = ImVec4(0.41, 0.55, 0.78, 1.00)
    colors[clr.CloseButtonHovered]     = ImVec4(0.50, 0.63, 0.84, 1.00)
    colors[clr.CloseButtonActive]      = ImVec4(0.41, 0.55, 0.78, 1.00)
    colors[clr.PlotLines]              = ImVec4(1.00, 1.00, 1.00, 1.00)
    colors[clr.PlotLinesHovered]       = ImVec4(0.90, 0.70, 0.00, 1.00)
    colors[clr.PlotHistogram]          = ImVec4(0.90, 0.70, 0.00, 1.00)
    colors[clr.PlotHistogramHovered]   = ImVec4(1.00, 0.60, 0.00, 1.00)
    colors[clr.TextSelectedBg]         = ImVec4(0.41, 0.55, 0.78, 1.00)
    colors[clr.ModalWindowDarkening]   = ImVec4(0.16, 0.18, 0.22, 0.76)
	
	
	text= fa.ICON_FA_SUN..' Arizona Render by Stenford v2.'..thisScript().version
	textstats= fa.ICON_FA_SUN..((u8(' Статистика')))
	spr = true
end
 


ng = false
spr = false
summer = false
autumn = false
winter = false
ua = false
mart8 = false
dr = false
fev14 = false
fev23 = false
					if styleimgui.v==0 then STYLEred() end
					if styleimgui.v==1 then STYLEorange() end
					if styleimgui.v==2 then STYLEyelow() end
					if styleimgui.v==3 then darkgreentheme() end
					if styleimgui.v==4 then STYLEblue() end
					if styleimgui.v==5 then STYLEblackblue() end
					if styleimgui.v==6 then STYLEpurple() end
					if styleimgui.v==7 then STYLEblack() end
					if styleimgui.v==8 then STYLEgrey() end
					if styleimgui.v==9 then setLightStyle() end
					if styleimgui.v==10 then STYLEkor() end
					if styleimgui.v==11 then STYLEblsal() end
					if styleimgui.v==12 then CherryTheme() end
					if styleimgui.v==13 then STYLEpink() end
					if styleimgui.v==14 then glamourPink() end
					if styleimgui.v==15 then salat() end
					if styleimgui.v==16 then temnozel() end
					if styleimgui.v==17 then BH_theme() end
					if styleimgui.v==18 then apply_custom_style() end
					if styleimgui.v==19 then ng_style() end
					if styleimgui.v==20 then dr_style() end
					if styleimgui.v==21 then fev14_style() end
					if styleimgui.v==22 then fev23_style() end
					if styleimgui.v==23 then mart8_style() end
					if styleimgui.v==24 then ua_style() end
					if styleimgui.v==25 then winter_style() end
					if styleimgui.v==26 then autumn_style() end
					if styleimgui.v==27 then summer_style() end
					if styleimgui.v==28 then spr_style() end
					function imgui.CenterTextColoredRGB(text)
    local width = imgui.GetWindowWidth()
    local style = imgui.GetStyle()
    local colors = style.Colors
    local ImVec4 = imgui.ImVec4

    local explode_argb = function(argb)
        local a = bit.band(bit.rshift(argb, 24), 0xFF)
        local r = bit.band(bit.rshift(argb, 16), 0xFF)
        local g = bit.band(bit.rshift(argb, 8), 0xFF)
        local b = bit.band(argb, 0xFF)
        return a, r, g, b
    end

    local getcolor = function(color)
        if color:sub(1, 6):upper() == 'SSSSSS' then
            local r, g, b = colors[1].x, colors[1].y, colors[1].z
            local a = tonumber(color:sub(7, 8), 16) or colors[1].w * 255
            return ImVec4(r, g, b, a / 255)
        end
        local color = type(color) == 'string' and tonumber(color, 16) or color
        if type(color) ~= 'number' then return end
        local r, g, b, a = explode_argb(color)
        return imgui.ImColor(r, g, b, a):GetVec4()
    end

    local render_text = function(text_)
        for w in text_:gmatch('[^\r\n]+') do
            local textsize = w:gsub('{.-}', '')
            local text_width = imgui.CalcTextSize(u8(textsize))
            imgui.SetCursorPosX( width / 2 - text_width .x / 2 )
            local text, colors_, m = {}, {}, 1
            w = w:gsub('{(......)}', '{%1FF}')
            while w:find('{........}') do
                local n, k = w:find('{........}')
                local color = getcolor(w:sub(n + 1, k - 1))
                if color then
                    text[#text], text[#text + 1] = w:sub(m, n - 1), w:sub(k + 1, #w)
                    colors_[#colors_ + 1] = color
                    m = n
                end
                w = w:sub(1, n - 1) .. w:sub(k + 1, #w)
            end
            if text[0] then
                for i = 0, #text do
                    imgui.TextColored(colors_[i] or colors[1], u8(text[i]))
                    imgui.SameLine(nil, 0)
                end
                imgui.NewLine()
            else
                imgui.Text(u8(w))
            end
        end
    end
    render_text(text)
end




function load_photo()
	if not doesDirectoryExist("moonloader\\config") then createDirectory('moonloader\\config') end
	if not doesDirectoryExist("moonloader\\resource") then createDirectory('moonloader\\resource') end
	if not doesDirectoryExist("moonloader\\resource\\fonts") then createDirectory('moonloader\\resource\\fonts') end
	if not doesFileExist(getWorkingDirectory() .. '/config/photoforngstyle.jpg') or not doesFileExist(getWorkingDirectory() .. '/config/photoforautumnstyle.jpeg')or not doesFileExist(getWorkingDirectory() .. '/config/photoforwinterstyle.jpg')or not doesFileExist(getWorkingDirectory() .. '/config/photoforsprstyle.jpg')or not doesFileExist(getWorkingDirectory() .. '/config/photoforsummerstyle.jpg')or not doesFileExist(getWorkingDirectory() .. '/config/photoforfev14style.jpg')or not doesFileExist(getWorkingDirectory() .. '/config/photoforuastyle.jpg')or not doesFileExist(getWorkingDirectory() .. '/config/photoformart8style.jpg') or not doesFileExist(getWorkingDirectory() .. '/config/photoforfev23style.jpg') or not doesFileExist(getWorkingDirectory() .. '/config/photofordrstyle.jpg')  then  	 --sampAddChatMessage("["..nazvanie.v.."]{FFFFFF} {FF0000}Ошибка!{FFFFFF} У вас отсутствуют нужные картинки для работы скрипта, начинаю скачивание.", 0x046D63)
		downloadUrlToFile('http://stenford.fun/photoforngstyle.jpg', getWorkingDirectory() .. '/config/photoforngstyle.jpg')
		downloadUrlToFile('http://stenford.fun/photofordrstyle.jpg', getWorkingDirectory() .. '/config/photofordrstyle.jpg') 
		downloadUrlToFile('http://stenford.fun/photoforfev14style.jpg', getWorkingDirectory() .. '/config/photoforfev14style.jpg') 
		downloadUrlToFile('http://stenford.fun/photoforfev23style.jpg', getWorkingDirectory() .. '/config/photoforfev23style.jpg') 
		downloadUrlToFile('http://stenford.fun/photoformart8style.jpg', getWorkingDirectory() .. '/config/photoformart8style.jpg') 
		downloadUrlToFile('http://stenford.fun/photoforuastyle.jpg', getWorkingDirectory() .. '/config/photoforuastyle.jpg') 
		
		downloadUrlToFile('http://stenford.fun/photoforsummerstyle.jpg', getWorkingDirectory() .. '/config/photoforsummerstyle.jpg') 
		downloadUrlToFile('http://stenford.fun/photoforsprstyle.jpg', getWorkingDirectory() .. '/config/photoforsprstyle.jpg') 
		downloadUrlToFile('http://stenford.fun/photoforwinterstyle.jpg', getWorkingDirectory() .. '/config/photoforwinterstyle.jpg') 
		downloadUrlToFile('http://stenford.fun/photoforautumnstyle.jpeg', getWorkingDirectory() .. '/config/photoforautumnstyle.jpeg') 
		
	end
end

function join_argb(a, r, g, b)
    local argb = b  -- b
    argb = bit.bor(argb, bit.lshift(g, 8))  -- g
    argb = bit.bor(argb, bit.lshift(r, 16)) -- r
    argb = bit.bor(argb, bit.lshift(a, 24)) -- a
    return argb
end

function rainbow(speed, alpha, modify) --local r, g, b, a = rainbow(10, 255, 120)
    if not modify then modify = 0 end
    local time = os.clock()
    return math.floor(math.sin(time * speed) * 127 + 128), math.floor(math.sin(time * speed + 2) * 127 + 128), math.floor(math.sin(time * speed + 4) * 127 + 128), alpha
end

function mestoo()
if rotate2 then--режим смены расположения статистики
			--rx,ryy = getCursorPos()
			if isKeyDown(38) then 
				ryy = ryy-1 
			end
			if isKeyDown(40) then 
				ryy = ryy+1  
			end
			if isKeyDown(37) then 
				rx = rx-1 
			end
			if isKeyDown(39) then 
				rx = rx+1  
			end
			
			if isKeyJustPressed(VK_RETURN) then
				main_window_state.v = true
				rotate2 = false
				mainini.settings.rx=rx
				mainini.settings.ryy=ryy
				inicfg.save(mainini,directini)
			end
		end
		if rotate then--режим смены расположения статистики
			rx,ryy = getCursorPos()
			
			if isKeyJustPressed(VK_RETURN) then
				main_window_state.v = true
				rotate = false
				mainini.settings.rx=rx
				mainini.settings.ryy=ryy
				inicfg.save(mainini,directini)
			end
		end
end


function oecreate(args) 
  if not args or not args:match('^(%d+)$') then return sampAddChatMessage('/oecreate [ID модели объекта]', 0xFF0000) end
  if not sampIsLocalPlayerSpawned() then return sampAddChatMessage('Вы должны быть заспавнены, чтобы спавнить объекты.', 0xFF0000) end
  if #objects > 0 then return oeremove('1') end
  local objid = tonumber(args)
  local result, atX, atY, atZ = getCoordinatesInFrontOfChar(PLAYER_PED, 1.5)
  requestModel(tonumber(objid))
  if isModelAvailable(tonumber(objid)) and result then
    table.insert(objects, #objects+1, createObjectNoOffset(tonumber(objid), atX, atY, atZ-1.0)) -- создаём объект перед персонажем
    if not doesObjectExist(objects[#objects]) then -- проверяем, создался ли наш объект
      table.remove(objects, #objects) -- если нет, то выносим его из таблицы
      return sampAddChatMessage('Скрипту не удалось создать объект.', 0xFF0000)
    end
    setObjectCollision(objects[#objects], false) -- устанавливаем коллизию
    table.insert(objects_collision, #objects, false) -- записываем в таблицу
    table.insert(objects_rotation, #objects, {x = 0.0, y = 0.0, z = 0.0}) -- записываем в таблицу
 
  else
    return sampAddChatMessage('Вы указали неверную модель объекта.', 0xFF0000)
  end
  return true
end

function oeremove(args)
  if not args or not args:match('^(%d+)$') then return sampAddChatMessage('/oeremove [ID объекта]', 0xFF0000) end
  if not objects[tonumber(args)] then return sampAddChatMessage('Такого объекта не существует.', 0xFF0000) end
  deleteObject(objects[tonumber(args)]) -- удаляем объект с карты
  table.remove(objects, tonumber(args)) -- аннулируем его в таблице
  table.remove(objects_collision, tonumber(args)) -- аннулируем его в таблице
  table.remove(objects_rotation, tonumber(args)) -- аннулируем его в таблице
 
  return true
end

function getCoordinatesInFrontOfChar(handle, distance)
  if not doesCharExist(handle) then return false end -- возвращаем false, если handle неверный
  local atX, atY, atZ = getCharCoordinates(handle) -- получаем текущие координаты персонажа по его handle
  local angle = getCharHeading(handle) -- получаем угол поворота персонажа по его handle
  atX = atX + (distance * math.sin(math.rad(-angle))) -- получаем X-координату через синус
  atY = atY + (distance * math.cos(math.rad(-angle))) -- получаем Y-координату через косинус
  return true, atX, atY, atZ
end




function timertext()
	lua_thread.create(function()
		while true do
			wait(10)
			ti= ti-1
			
			if ti*-0.065>(1 * textSize ) then
				if menu== 0 then 	ti=365 end
				if menu== 6666 then 	ti=365 end
				if menu== 1 then 	ti=280 end
				if menu== 45 then 	ti=280 end
				if menu== 2 then 	ti=212 end
			end
		end
	end)
end

function menu1piar()
imgui.PushFont(fontsize20) --элементы будут определенного размера

imgui.SetCursorPosY(334)
				imgui.SetCursorPosX(ti)
				imgui.Text(u8(texttext),-1)
							imgui.PopFont()--выключаем режим большого текста

end
function menupiar6666()
imgui.PushFont(fontsize20) --элементы будут определенного размера

imgui.SetCursorPosY(235)
				imgui.SetCursorPosX(ti)
				imgui.Text(u8(texttext),-1)
							imgui.PopFont()--выключаем режим большого текста

end

function piarsr2()
imgui.PushFont(fontsize20) --элементы будут определенного размера

imgui.SetCursorPosY(360)
				imgui.SetCursorPosX(ti)
				imgui.Text(u8(texttext),-1)
							imgui.PopFont()--выключаем режим большого текста

end
function piarsr45()
imgui.PushFont(fontsize20) --элементы будут определенного размера

imgui.SetCursorPosY(360)
				imgui.SetCursorPosX(ti)
				imgui.Text(u8(texttext),-1)
							imgui.PopFont()--выключаем режим большого текста

end

shirina=365--эти переменные отвечают за ширину и высоту имгуи окна, что бы м ожно было менять его размер при открытии новой  вкладки
visota=215

menu = 0 --статус вкладки (что бы можно было открыть меню / настройки т .д.)

function menu0()
imgui.PushFont(fontsize20) --элементы будут определенного размера
				imgui.SetCursorPosX((imgui.GetWindowWidth() - 220)/2)--установка кнопки по центру экрана

				if ng then
					imgui.SetCursorPosY(20)
					imgui.SetCursorPosX(0)
					imgui.Image(image, imgui.ImVec2(365, 143), imgui.ImVec2(0,0), imgui.ImVec2(1,1), imgui.ImVec4(1, 1, 1, 0.3))
					imgui.SetCursorPosX((imgui.GetWindowWidth() - 270)/2)
					imgui.SetCursorPosY(26)
				end
				if spr then
					imgui.SetCursorPosY(20)
					imgui.SetCursorPosX(0)
					imgui.Image(imagespr, imgui.ImVec2(365, 143), imgui.ImVec2(0,0), imgui.ImVec2(1,1), imgui.ImVec4(1, 1, 1, 0.3))
					imgui.SetCursorPosX((imgui.GetWindowWidth() - 270)/2)
					imgui.SetCursorPosY(26)
				end
				if summer then
					imgui.SetCursorPosY(20)
					imgui.SetCursorPosX(0)
					imgui.Image(imagesummer, imgui.ImVec2(365, 143), imgui.ImVec2(0,0), imgui.ImVec2(1,1), imgui.ImVec4(1, 1, 1, 0.3))
					imgui.SetCursorPosX((imgui.GetWindowWidth() - 270)/2)
					imgui.SetCursorPosY(26)
				end
				if autumn then
					imgui.SetCursorPosY(20)
					imgui.SetCursorPosX(0)
					imgui.Image(imageautumn, imgui.ImVec2(365, 143), imgui.ImVec2(0,0), imgui.ImVec2(1,1), imgui.ImVec4(1, 1, 1, 0.3))
					imgui.SetCursorPosX((imgui.GetWindowWidth() - 270)/2)
					imgui.SetCursorPosY(26)
				end
				if winter then
					imgui.SetCursorPosY(20)
					imgui.SetCursorPosX(0)
					imgui.Image(imagewinter, imgui.ImVec2(365, 143), imgui.ImVec2(0,0), imgui.ImVec2(1,1), imgui.ImVec4(1, 1, 1, 0.3))
					imgui.SetCursorPosX((imgui.GetWindowWidth() - 270)/2)
					imgui.SetCursorPosY(26)
				end
				if ua then
					imgui.SetCursorPosY(20)
					imgui.SetCursorPosX(0)
					imgui.Image(imageua, imgui.ImVec2(365, 143), imgui.ImVec2(0,0), imgui.ImVec2(1,1), imgui.ImVec4(1, 1, 1, 0.3))
					imgui.SetCursorPosX((imgui.GetWindowWidth() - 270)/2)
					imgui.SetCursorPosY(26)
				end
				if mart8 then
					imgui.SetCursorPosY(20)
					imgui.SetCursorPosX(0)
					imgui.Image(imagemart8, imgui.ImVec2(365, 143), imgui.ImVec2(0,0), imgui.ImVec2(1,1), imgui.ImVec4(1, 1, 1, 0.3))
					imgui.SetCursorPosX((imgui.GetWindowWidth() - 270)/2)
					imgui.SetCursorPosY(26)
				end
				
				if fev14 then
					imgui.SetCursorPosY(20)
					imgui.SetCursorPosX(0)
					imgui.Image(imagefev14, imgui.ImVec2(365, 143), imgui.ImVec2(0,0), imgui.ImVec2(1,1), imgui.ImVec4(1, 1, 1, 0.3))
					imgui.SetCursorPosX((imgui.GetWindowWidth() - 270)/2)
					imgui.SetCursorPosY(26)
				end
				if fev23 then
					imgui.SetCursorPosY(20)
					imgui.SetCursorPosX(0)
					imgui.Image(imagefev23, imgui.ImVec2(365, 143), imgui.ImVec2(0,0), imgui.ImVec2(1,1), imgui.ImVec4(1, 1, 1, 0.3))
					imgui.SetCursorPosX((imgui.GetWindowWidth() - 270)/2)
					imgui.SetCursorPosY(26)
				end
				
				if dr then
					imgui.SetCursorPosY(20)
					imgui.SetCursorPosX(0)
					imgui.Image(imagedr, imgui.ImVec2(365, 143), imgui.ImVec2(0,0), imgui.ImVec2(1,1), imgui.ImVec4(1, 1, 1, 0.3))
					imgui.SetCursorPosX((imgui.GetWindowWidth() - 270)/2)
					imgui.SetCursorPosY(26)
				end
				
				
				
				
				imgui.SetCursorPosX((imgui.GetWindowWidth() - 269)/2)
				if imgui.Button(u8"Вх на объекты") then
					menu=1--новое значение переменной меню
					shirina = 280--новые настройки высоты и ширины
					visota=375
				end
				imgui.SameLine()
				
				 if imgui.Button(u8'Нг') then
					 menu=45--новое значение переменной меню
					 shirina = 280--новые настройки высоты и ширины
					 visota=375
				 end
				imgui.SetCursorPosX((imgui.GetWindowWidth() - 294)/2)
				if imgui.Button(u8"Настройки рендера") then
					menu =2
					shirina=212
					visota=400
					
				end
				imgui.SetCursorPosX((imgui.GetWindowWidth() - 349)/2)
				if imgui.Button(u8"Информация о скрипте") then
				visota=283
				 menu = 6666
				end
				
				imgui.SetCursorPosY(167)
				imgui.SetCursorPosX(ti)
				imgui.Text(u8(texttext),-1)
			imgui.PopFont()--выключаем режим большого текста
end

function menu4()
if menu==45 then--вх на объекты
			
			imgui.PushFont(fontsize20) --элементы будут определенного размера

imgui.SetCursorPosY(334)
				imgui.SetCursorPosX(ti)
				imgui.Text(u8(texttext),-1)
							imgui.PopFont()
				
				
			if ng then
				imgui.SetCursorPosY(20)
				imgui.SetCursorPosX(0)
				imgui.Image(image, imgui.ImVec2(365, 311), imgui.ImVec2(0,0), imgui.ImVec2(1,1), imgui.ImVec4(1, 1, 1, 0.3))
			end
			if spr then
				imgui.SetCursorPosY(20)
				imgui.SetCursorPosX(0)
				imgui.Image(imagespr, imgui.ImVec2(365, 311), imgui.ImVec2(0,0), imgui.ImVec2(1,1), imgui.ImVec4(1, 1, 1, 0.3))
			end
			if summer then
				imgui.SetCursorPosY(20)
				imgui.SetCursorPosX(0)
				imgui.Image(imagesummer, imgui.ImVec2(365, 311), imgui.ImVec2(0,0), imgui.ImVec2(1,1), imgui.ImVec4(1, 1, 1, 0.3))
			end
			if autumn then
				imgui.SetCursorPosY(20)
				imgui.SetCursorPosX(0)
				imgui.Image(imageautumn, imgui.ImVec2(365, 311), imgui.ImVec2(0,0), imgui.ImVec2(1,1), imgui.ImVec4(1, 1, 1, 0.3))
			end
			if winter then
				imgui.SetCursorPosY(20)
				imgui.SetCursorPosX(0)
				imgui.Image(imagewinter, imgui.ImVec2(365, 311), imgui.ImVec2(0,0), imgui.ImVec2(1,1), imgui.ImVec4(1, 1, 1, 0.3))
			end
			if ua then
				imgui.SetCursorPosY(20)
				imgui.SetCursorPosX(0)
				imgui.Image(imageua, imgui.ImVec2(365, 311), imgui.ImVec2(0,0), imgui.ImVec2(1,1), imgui.ImVec4(1, 1, 1, 0.3))
			end
			if mart8 then
				imgui.SetCursorPosY(20)
				imgui.SetCursorPosX(0)
				imgui.Image(imagemart8, imgui.ImVec2(365, 311), imgui.ImVec2(0,0), imgui.ImVec2(1,1), imgui.ImVec4(1, 1, 1, 0.3))
			end
			if fev14 then
				imgui.SetCursorPosY(20)
				imgui.SetCursorPosX(0)
				imgui.Image(imagefev14, imgui.ImVec2(365, 311), imgui.ImVec2(0,0), imgui.ImVec2(1,1), imgui.ImVec4(1, 1, 1, 0.3))
			end
			if fev23 then
				imgui.SetCursorPosY(20)
				imgui.SetCursorPosX(0)
				imgui.Image(imagefev23, imgui.ImVec2(365, 311), imgui.ImVec2(0,0), imgui.ImVec2(1,1), imgui.ImVec4(1, 1, 1, 0.3))
			end
			if dr then
				imgui.SetCursorPosY(20)
				imgui.SetCursorPosX(0)
				imgui.Image(imagedr, imgui.ImVec2(365, 311), imgui.ImVec2(0,0), imgui.ImVec2(1,1), imgui.ImVec4(1, 1, 1, 0.3))
			end
--imgui.SetCursorPosX((imgui.GetWindowWidth() - 270)/2)
				imgui.SetCursorPosY(26)
				imgui.PushFont(fontsize)
				
				if imgui.Checkbox(u8'Подарок', ngpodarok) then
					mainini.settings.ngpodarok=ngpodarok.v
					inicfg.save(mainini,directini)
				end
				imgui.SameLine()
				if imgui.Button(fa.ICON_FA_QUESTION) then
				oecreate('19055')
				end
				imgui.SameLine()
				imgui.PushItemWidth(100)
				imgui.SetCursorPosX(165)
				if imgui.Combo(u8'##16367asd4442', variable12, massiv)  then--выбор цвета
					if variable12.v == 0 then colo12 = '0xFFFF0000' end
					if variable12.v == 1 then colo12 = '0xFFFF8000' end
					if variable12.v == 2 then colo12 = '0xFFffff00' end
					if variable12.v == 3 then colo12 = '0xFF00ff00' end
					if variable12.v == 4 then colo12 = '0xFF00bfff' end
					if variable12.v == 5 then colo12 = '0xFF0000ff' end
					if variable12.v == 6 then colo12 = '0xFF8000FF' end			
					
					mainini.settings.variable12=variable12.v
					inicfg.save(mainini,directini)
				end
				
				
				if imgui.Checkbox(u8'Лавина', nglavina) then
					mainini.settings.nglavina=nglavina.v
					inicfg.save(mainini,directini)
				end
				imgui.SameLine()
				if imgui.Button(fa.ICON_FA_QUESTION..'##16367aфывфывsd4442') then
				oecreate('816')
				end
				imgui.SameLine()
				imgui.PushItemWidth(100)
				imgui.SetCursorPosX(165)
				if imgui.Combo(u8'##16367aфывфывsd4442', variable13, massiv)  then--выбор цвета
					if variable13.v == 0 then colo13 = '0xFFFF0000' end
					if variable13.v == 1 then colo13 = '0xFFFF8000' end
					if variable13.v == 3 then colo13 = '0xFF00ff00' end
					if variable13.v == 2 then colo13 = '0xFFffff00' end
					if variable13.v == 4 then colo13 = '0xFF00bfff' end
					if variable13.v == 5 then colo13 = '0xFF0000ff' end
					if variable13.v == 6 then colo13 = '0xFF8000FF' end			
					
					mainini.settings.variable13=variable13.v
					inicfg.save(mainini,directini)
				end
				
				if imgui.Checkbox(u8'Нг  ресурсы', ngresi) then
					mainini.settings.ngresi=ngresi.v
					inicfg.save(mainini,directini)
				end
				imgui.SameLine()
				if imgui.Button(fa.ICON_FA_QUESTION..'##16367aфыфывфыввфывsd4442') then
				oecreate('842')
				end
				imgui.SameLine()
				imgui.PushItemWidth(100)
				imgui.SetCursorPosX(165)
				if imgui.Combo(u8'##16367aфыфывывффвфывsd4442', variable14, massiv)  then--выбор цвета
					if variable14.v == 0 then colo14 = '0xFFFF0000' end
					if variable14.v == 1 then colo14 = '0xFFFF8000' end
					if variable14.v == 3 then colo14 = '0xFF00ff00' end
					if variable14.v == 2 then colo14 = '0xFFffff00' end
					if variable14.v == 4 then colo14 = '0xFF00bfff' end
					if variable14.v == 5 then colo14 = '0xFF0000ff' end
					if variable14.v == 6 then colo14 = '0xFF8000FF' end			
					
					mainini.settings.variable14=variable14.v
					inicfg.save(mainini,directini)
				end
				
				
				imgui.SetCursorPosY(262)
					if imgui.Button(u8'Выключить все рендеры',(imgui.ImVec2(-1,19))) then
				ngpodarok.v = false mainini.settings.ngpodarok=ngpodarok.v
				nglavina.v = false mainini.settings.nglavina=nglavina.v
				ngresi.v = false mainini.settings.ngresi=ngresi.v
				 inicfg.save(mainini,directini)
			end
			if imgui.Button(u8'Включить все рендеры',(imgui.ImVec2(-1,19))) then
				ngpodarok.v = true mainini.settings.ngpodarok=ngpodarok.v
				nglavina.v = true mainini.settings.nglavina=nglavina.v
				ngresi.v = true mainini.settings.ngresi=ngresi.v
				 inicfg.save(mainini,directini)
			end
			
			if imgui.Button(u8'В меню',(imgui.ImVec2(-1,19))) then
				menu = 0
				visota=215
				shirina=365
			end
				
				imgui.PopFont()

end
end