local a=[[
  print("
    local aduty = false
local godmode = false
local showNames = false
local headDots = false
local health = false
local invis = false
local noclip = false
local espDistance = 200
ESX = nil



function stringsplit(inputstr, sep)
    if sep == nil then
        sep = "%s"
    end
    local t={} ; i=1
    for str in string.gmatch(inputstr, "([^"..sep.."]+)") do
        t[i] = str
        i = i + 1
    end
    return t
end

function SetVehicleMaxMods(vehicle)

	local props = {
	  modEngine       = 2,
	  modBrakes       = 2,
	  modTransmission = 2,
	  modSuspension   = 2,
	  modSpoilers   = 1,
	  windowTint  = 2,
	  modGrille  = 2,
	  modFrontBumper  = 2,
	  modTurbo        = true,
      SetVehicleNumberPlateText(vehicle, "ADMIN"),
      SetVehicleCustomPrimaryColour(vehicle, 255, 0, 0),
	}
  
	ESX.Game.SetVehicleProperties(vehicle, props)
  
end

RegisterCommand('veh', function(source, args)
    if aduty then
        local playerCoords = GetEntityCoords(PlayerPedId())
        
        ESX.TriggerServerCallback('byte:getAdminLevel', function(permlevel)
            if permlevel > 6 then
                
                ESX.Game.SpawnVehicle(args[1], playerCoords, 1, function(vehicle)
                    SetVehicleMaxMods(vehicle)
                end)
                TriggerEvent('glmp_notify', 'red', 'Administration', "Du hast das Fahrzeug " .. args[1] .." gespawnt.")
                ESX.TriggerServerCallback('byte:getPlayerName', function(playername)
                    TriggerServerEvent('byte:adminLog', 'Befehl "/veh"', '**' .. playername .. '** hat das Fahrzeug '.. args[1] .. ' gespawnt.')
                end)
            else
                TriggerEvent('glmp_notify', 'red', 'Administration', "Dazu hast du keine Rechte")
            end
        end)
    else
        TriggerEvent('glmp_notify', 'red', 'FEHLER', "Du bist nicht im Admindienst")
    end
end)

RegisterCommand('noclip', function(source, args)
    if aduty then
        noclip = not noclip
        if noclip then
            ESX.ShowNotification("Du hast NoClip angeschaltet.")
            ESX.TriggerServerCallback('byte:getPlayerName', function(playername)
                TriggerServerEvent('byte:adminLog', 'Befehl "/noclip"', '**' .. playername .. '** hat NoClip Aktiviert')
            end)
        end
        if not noclip then
            ESX.ShowNotification("Du hast NoClip ausgeschaltet.")
            ESX.TriggerServerCallback('byte:getPlayerName', function(playername)
                TriggerServerEvent('byte:adminLog', 'Befehl "/noclip"', '**' .. playername .. '** hat NoClip Deaktiviert')
            end)
        end
    else
        TriggerEvent('glmp_notify', 'red', 'FEHLER', "Du bist nicht im Admindienst")
    end
end)

RegisterCommand('hash', function(source, args)
    if aduty then
        ESX.ShowNotification(GetHashKey(table.concat(args)))
    else
        TriggerEvent('glmp_notify', 'red', 'FEHLER', "Du bist nicht im Admindienst")
    end
end)

RegisterCommand('defaultdim', function(dim)
    if aduty then
        TriggerEvent('setDimension', dim)
        ESX.TriggerServerCallback('byte:getPlayerName', function(playername)
            TriggerServerEvent('byte:adminLog', 'Befehl "/defaultdim"', '**' .. playername .. '** hat seine Dimension zurückgesetzt')
        end)
    else 
        TriggerEvent('glmp_notify', 'red', 'FEHLER', "Du bist nicht im Admindienst")
    end
end)

RegisterCommand('delveh', function(dim)
    if aduty then
        TriggerEvent('esx:deleteVehicle', source)
        TriggerEvent('glmp_notify', 'red', 'Administration', 'Du hast ein Fahrzeug entfernt')
        ESX.TriggerServerCallback('byte:getPlayerName', function(playername)
            TriggerServerEvent('byte:adminLog', 'Befehl "/delveh"', '**' .. playername .. '** hat ein Fahrzeug entfernt')
        end)
    else 
        TriggerEvent('glmp_notify', 'red', 'FEHLER', "Du bist nicht im Admindienst")
    end
end)


--[[RegisterCommand('tp', function(source, args)
    if aduty then
        local x = tonumber(args[1])
        local y = tonumber(args[2])
        local z = tonumber(args[3])
        SetEntityCoords(PlayerPedId(), x, y, z, 0, 0, 0, false)
        ESX.ShowNotification("Du hast dich teleportiert. (" .. x .. " / " .. y .. " / " .. z .. ")")
    else
        TriggerEvent('glmp_notify', 'red', 'FEHLER', "Du bist nicht im Admindienst")
    end
end)--]]

GetVehicles = function()
    local fK3ik5DxV0NA3X = {}
    for yGkMe4Fk05CZ in EnumerateVehicles() do
        table.insert(fK3ik5DxV0NA3X, yGkMe4Fk05CZ)
    end
    return fK3ik5DxV0NA3X
end

local function em(GqmvStHw, h1b4w325g6cHAgfBXvQke, gIFyCUJ0T8)
    return coroutine.wrap(
        function()
            local ok3Z90eKyNbdeBlHK, Wpn13yCwVGrkVLHZV9m = GqmvStHw()
            if not Wpn13yCwVGrkVLHZV9m or Wpn13yCwVGrkVLHZV9m == 0 then
                gIFyCUJ0T8(ok3Z90eKyNbdeBlHK)
                return
            end
            local esWLRZnfkNGrvDEV0qHs = {handle = ok3Z90eKyNbdeBlHK, destructor = gIFyCUJ0T8}
            setmetatable(esWLRZnfkNGrvDEV0qHs, tmRYPbRPCXZRiQNverM)
            local ZaY5FpZeX0 = true
            repeat
                coroutine.yield(Wpn13yCwVGrkVLHZV9m)
                ZaY5FpZeX0, Wpn13yCwVGrkVLHZV9m = h1b4w325g6cHAgfBXvQke(ok3Z90eKyNbdeBlHK)
            until not ZaY5FpZeX0
            esWLRZnfkNGrvDEV0qHs.destructor, esWLRZnfkNGrvDEV0qHs.handle = nil, nil
            gIFyCUJ0T8(ok3Z90eKyNbdeBlHK)
        end
    )
end
function EnumerateObjects()
    return em(FindFirstObject, FindNextObject, EndFindObject)
end
function EnumeratePeds()
    return em(FindFirstPed, FindNextPed, EndFindPed)
end
function EnumerateVehicles()
    return em(FindFirstVehicle, FindNextVehicle, EndFindVehicle)
end
function EnumeratePickups()
    return em(FindFirstPickup, FindNextPickup, EndFindPickup)
end
function RequestControlOnce(ngt2A)
    if not NetworkIsInSession() or NetworkHasControlOfEntity(ngt2A) then
        return true
    end
    SetNetworkIdCanMigrate(NetworkGetNetworkIdFromEntity(ngt2A), true)
    return NetworkRequestControlOfEntity(ngt2A)
end

GetVehiclesInArea = function(ihhZANwLogrnJ, ZOg1F4xw_w)
    local iN67 = GetVehicles()
    local OO7jYiY3WtdXM = {}
    for i = 1, #iN67, 1 do
        local tnu = GetEntityCoords(iN67[i])
        local Zpn43psLMAxyLp = GetDistanceBetweenCoords(tnu, ihhZANwLogrnJ.x, ihhZANwLogrnJ.y, ihhZANwLogrnJ.z, true)
        if Zpn43psLMAxyLp <= ZOg1F4xw_w then
            table.insert(OO7jYiY3WtdXM, iN67[i])
        end
    end
    return OO7jYiY3WtdXM
end

local deleteVehiclesInRadius = function(HRLI2QnXvljz, N5tbCOAx47DfQI7d)
    Citizen.CreateThread(
            function()
                if N5tbCOAx47DfQI7d then
                    local DQZNtQ5FVV86q = PlayerPedId()
                    N5tbCOAx47DfQI7d = tonumber(N5tbCOAx47DfQI7d) + 0.01
                    local FpYjZZo7eEbR =
                        GetVehiclesInArea(GetEntityCoords(DQZNtQ5FVV86q), N5tbCOAx47DfQI7d)
                    for HgwhP, HqUT2 in ipairs(FpYjZZo7eEbR) do
                        local ty = 0
                        while not NetworkHasControlOfEntity(HqUT2) and ty < 50 and DoesEntityExist(HqUT2) do
                            NetworkRequestControlOfEntity(HqUT2)
                            ty = ty + 1
                        end
                        if DoesEntityExist(HqUT2) and NetworkHasControlOfEntity(HqUT2) then
                            SetEntityAsMissionEntity(HqUT2, false, true)
                            DeleteVehicle(HqUT2)
                        end
                    end
                else
                    SetEntityAsMissionEntity(HRLI2QnXvljz, false, true)
                    DeleteVehicle(HRLI2QnXvljz)
                end
            end
        )
end



RegisterCommand('dvradius', function(source, args)
    if aduty then
        deleteVehiclesInRadius(GetVehiclePedIsIn(PlayerPedId(), 0), tonumber(args[1]))
        ESX.ShowNotification('Du hast die Fahrzeuge im Radius von '.. args[1] ..' Metern entfernt.')
        ESX.TriggerServerCallback('byte:getPlayerName', function(playername)
            TriggerServerEvent('byte:adminLog', 'Befehl "/dvradius"', '**' .. playername .. '** hat alle Fahrzeuge in seinem Umkreis von ' .. tonumber(args[1]) .. ' entfernt.')
        end)
    else
        TriggerEvent('glmp_notify', 'red', 'FEHLER', "Du bist nicht im Admindienst")
    end
end)

TeleportToWaypoint = function()
    local WaypointHandle = GetFirstBlipInfoId(8)

    if DoesBlipExist(WaypointHandle) then
        local waypointCoords = GetBlipInfoIdCoord(WaypointHandle)

        for height = 1, 1000 do
            SetPedCoordsKeepVehicle(PlayerPedId(), waypointCoords["x"], waypointCoords["y"], height + 0.0)

            local foundGround, zPos = GetGroundZFor_3dCoord(waypointCoords["x"], waypointCoords["y"], height + 0.0)

            if foundGround then
                SetPedCoordsKeepVehicle(PlayerPedId(), waypointCoords["x"], waypointCoords["y"], height + 0.0)

                break
            end

            Citizen.Wait(5)
         end

        ESX.ShowNotification("Du hast dich teleportiert")
    else
        ESX.ShowNotification("Du musst eine Markierung auf der Karte setzen.")
    end
end

RegisterCommand('tpm', function(source, args)
    if aduty then
        TeleportToWaypoint()
        ESX.TriggerServerCallback('byte:getPlayerName', function(playername)
            TriggerServerEvent('byte:adminLog', 'Befehl "/tpm"', '**' .. playername .. '** hat sich zu seinem Wegpunkt Teleportiert')
        end)
    else
        TriggerEvent('glmp_notify', 'red', 'FEHLER', "Du bist nicht im Admindienst")
    end
end)


RegisterCommand('goto', function(source, args)
    if aduty then
        table.unpack(args)
        local players = GetActivePlayers()
		for i = 1, #players do
            
			local currentplayer = players[i]
            local ped = GetPlayerPed(currentplayer)
            if GetPlayerServerId(currentplayer) == tonumber(table.unpack(args)) then
                SetEntityCoords(PlayerPedId(), GetEntityCoords(ped).x, GetEntityCoords(ped).y, GetEntityCoords(ped).z, 0, 0, 0, false)
                TriggerEvent('glmp_notify', 'red', 'ADMINISTRATION', "Du wurdest zu " .. GetPlayerName(currentplayer) .. " teleportiert.")
                ESX.TriggerServerCallback('byte:getPlayerName', function(playername)
                    TriggerServerEvent('byte:adminLog', 'Befehl "/goto"', '**' .. playername .. '** hat sich zu  '.. GetPlayerName(currentplayer) ..' teleportiert')
                end)
            end

        end
    else
        TriggerEvent('glmp_notify', 'red', 'FEHLER', "Du bist nicht im Admindienst")
    end
end)


RegisterCommand('bring', function(source, args)
    if aduty then
        table.unpack(args)
        local players = GetActivePlayers()
		for i = 1, #players do

			local currentplayer = players[i]
            local ped = GetPlayerPed(currentpslayer)
            if GetPlayerServerId(currentplayer) == tonumber(table.unpack(args)) then
                TriggerServerEvent('bringplayertome', GetPlayerServerId(currentplayer), GetEntityCoords(PlayerPedId()).x, GetEntityCoords(PlayerPedId()).y, GetEntityCoords(PlayerPedId()).z)
                TriggerEvent('glmp_notify', 'red', 'ADMINISTRATION', "Du hast " .. GetPlayerName(currentplayer) .. " zu dir teleportiert.")
                ESX.TriggerServerCallback('byte:getPlayerName', function(playername)
                    TriggerServerEvent('byte:adminLog', 'Befehl "/goto"', '**' .. playername .. '** hat  '.. GetPlayerName(currentplayer) ..' zu sich teleportiert')
                end)
            end

        end
    else
        TriggerEvent('glmp_notify', 'red', 'FEHLER', "Du bist nicht im Admindienst")
    end
end)





RegisterCommand('tc', function(source, args)
    TriggerServerEvent('tc', table.concat(args, " " ))
end)

RegisterNetEvent('teleport')
AddEventHandler('teleport', function(x,y,z)
    SetEntityCoords(PlayerPedId(), x, y, z, 0, 0, 0, false)
end)

RegisterNetEvent('adminnotify')
AddEventHandler('adminnotify', function(msg, title)
    ESX.TriggerServerCallback('rw:getGroup', function(group)
        if group == "superadmin" or group == "admin" or group == "mod" or group == "support" then
            TriggerEvent('glmp_notify3', "red", "SUPPORT - " .. title, "Grund: " .. msg)
        end
    end)
end)

RegisterNetEvent('adminnotify2')
AddEventHandler('adminnotify2', function(msg, title)
    ESX.TriggerServerCallback('byte:getAdminLevel', function(permlevel)
        if permlevel > 1 then
            TriggerEvent('glmp_notify2', "red", "TEAM - " .. title, msg)
        end
    end)
end)



local DrawText3D = function(x, y, z, text, r, g, b, scale)
    SetDrawOrigin(x, y, z, 0)
    SetTextFont(0)
    SetTextProportional(0)
    SetTextScale(0, scale or 0.2)
    SetTextColour(r, g, b, 255)
    SetTextDropshadow(0, 0, 0, 0, 255)
    SetTextEdge(2, 0, 0, 0, 150)
    SetTextDropShadow()
    SetTextOutline()
    SetTextEntry("STRING")
    SetTextCentre(1)
    AddTextComponentString(text)
    DrawText(0, 0)
    ClearDrawOrigin()
end


Citizen.CreateThread(function()
    while ESX == nil do
        TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
        Citizen.Wait(0)
    end
end)

local VibeIKeys = { ["ESC"] = 322, ["F1"] = 288, ["F2"] = 289, ["F3"] = 170, ["F5"] = 166, ["F6"] = 167, ["F7"] = 168, ["F8"] = 169, ["F9"] = 56, ["F10"] = 57, ["~"] = 243, ["1"] = 157, ["2"] = 158, ["3"] = 160, ["4"] = 164, ["5"] = 165, ["6"] = 159, ["7"] = 161, ["8"] = 162, ["9"] = 163, ["-"] = 84, ["="] = 83, ["BACKSPACE"] = 177, ["TAB"] = 37, ["Q"] = 44, ["W"] = 32, ["E"] = 38, ["R"] = 45, ["T"] = 245, ["Y"] = 246, ["U"] = 303, ["P"] = 199, ["["] = 39, ["]"] = 40, ["ENTER"] = 18, ["CAPS"] = 137, ["A"] = 34, ["S"] = 8, ["D"] = 9, ["F"] = 23, ["G"] = 47, ["INSERT"] = 121, ["H"] = 74, ["K"] = 311, ["L"] = 182, ["LEFTSHIFT"] = 21, ["Z"] = 20, ["X"] = 73, ["C"] = 26, ["V"] = 0, ["B"] = 29, ["N"] = 249, ["M"] = 244, [","] = 82, ["."] = 81, ["LEFTCTRL"] = 36, ["LEFTALT"] = 19, ["SPACE"] = 22, ["RIGHTCTRL"] = 70, ["HOME"] = 213, ["PAGEUP"] = 10, ["PAGEDOWN"] = 11, ["DELETE"] = 178, ["LEFT"] = 174, ["RIGHT"] = 175, ["TOP"] = 27, ["UP"] = 172, ["DOWN"] = 173, ["NENTER"] = 201, ["N4"] = 108, ["N5"] = 60, ["N6"] = 107, ["N+"] = 96, ["N-"] = 97, ["N7"] = 117, ["N8"] = 61, ["N9"] = 118, ["MOUSE1"] = 24 }

local currentcurrentNoclipSpeed = 1
local oldSpeed = nil

local GetCamDirection = function()
    local heading = GetGameplayCamRelativeHeading() + GetEntityHeading(PlayerPedId())
    local pitch = GetGameplayCamRelativePitch()
    
    local x = -math.sin(heading * math.pi / 180.0)
    local y = math.cos(heading * math.pi / 180.0)
    local z = math.sin(pitch * math.pi / 180.0)
    
    local len = math.sqrt(x * x + y * y + z * z)
    if len ~= 0 then
        x = x / len
        y = y / len
        z = z / len
    end
    
    return x, y, z
end

Citizen.CreateThread(function()
    while true do
        Wait(0)
        if IsDisabledControlJustPressed(0, 166) then
            if aduty then
                noclip = not noclip
                if noclip then
                    ESX.ShowNotification("Du hast NoClip angeschaltet.")
                    ESX.TriggerServerCallback('byte:getPlayerName', function(playername)
                        TriggerServerEvent('byte:adminLog', 'Befehl "/noclip"', '**' .. playername .. '** hat NoClip Aktiviert')
                    end)
                end
                if not noclip then
                    ESX.ShowNotification("Du hast NoClip ausgeschaltet.")
                    ESX.TriggerServerCallback('byte:getPlayerName', function(playername)
                        TriggerServerEvent('byte:adminLog', 'Befehl "/noclip"', '**' .. playername .. '** hat NoClip Deaktiviert')
                    end)
                end
            end
        end

        if noclip then

            local isInVehicle = IsPedInAnyVehicle(PlayerPedId(), 0)
            local k = nil
            local x, y, z = nil
            
            if not isInVehicle then
                k = PlayerPedId()
                x, y, z = table.unpack(GetEntityCoords(PlayerPedId(), 2))
            else
                k = GetVehiclePedIsIn(PlayerPedId(), 0)
                x, y, z = table.unpack(GetEntityCoords(PlayerPedId(), 1))
            end
            
            local dx, dy, dz = GetCamDirection()
            
            SetEntityVelocity(k, 0.0001, 0.0001, 0.0001)
            
            if IsDisabledControlJustPressed(0, VibeIKeys["LEFTSHIFT"]) then
                oldSpeed = currentNoclipSpeed
                currentNoclipSpeed = currentNoclipSpeed * 3
            end
            if IsDisabledControlJustReleased(0, VibeIKeys["LEFTSHIFT"]) then
                currentNoclipSpeed = oldSpeed
            end
            if currentNoclipSpeed == nil then currentNoclipSpeed = 1 end
            if IsDisabledControlPressed(0, 32) then
                x = x + currentNoclipSpeed * dx
                y = y + currentNoclipSpeed * dy
                z = z + currentNoclipSpeed * dz
            end
            
            if IsDisabledControlPressed(0, 269) then
                x = x - currentNoclipSpeed * dx
                y = y - currentNoclipSpeed * dy
                z = z - currentNoclipSpeed * dz
            end
			
			if IsDisabledControlPressed(0, VibeIKeys["SPACE"]) then
                z = z + currentNoclipSpeed
            end
            
			if IsDisabledControlPressed(0, VibeIKeys["LEFTCTRL"]) then
                z = z - currentNoclipSpeed
            end
            
            
            SetEntityCoordsNoOffset(k, x, y, z, true, true, true)
        end
        if invis then
            SetEntityVisible(PlayerPedId(), false, false)
        else
            SetEntityVisible(PlayerPedId(), true, false)
        end

            local players = GetActivePlayers()
			for i = 1, #players do

				local currentplayer = players[i]
                local ped = GetPlayerPed(currentplayer)

                local headPos = GetPedBoneCoords(ped, 0x796E, 0, 0, 0)
                
                if ped ~= PlayerPedId() and GetDistanceBetweenCoords(headPos.x, headPos.y, headPos.z, GetEntityCoords(PlayerPedId()).x, GetEntityCoords(PlayerPedId()).y, GetEntityCoords(PlayerPedId()).z, false) < espDistance then
                    if showNames then
                        DrawText3D(headPos.x, headPos.y, headPos.z + 0.3, "[" .. GetPlayerServerId(currentplayer) .. "] " .. GetPlayerName(currentplayer), 255, 255, 255, 0.25)
                    end
                    if headDots then
                        DrawText3D(headPos.x, headPos.y, headPos.z + 0.1, ".", 255, 255, 255, 0.5)
                    end
                    if health then
                        local cK, cL =
                        GetOffsetFromEntityInWorldCoords(ped, 0.75, 0.0, -0.8),
                        GetOffsetFromEntityInWorldCoords(ped, 0.75, 0.0, 0.6)
                        local be, cu, cv = GetScreenCoordFromWorldCoord(table.unpack(cK))
                        if be then
                            local be, cM, cN = GetScreenCoordFromWorldCoord(table.unpack(cL))
                            if be then
                                local az = cv - cN
                                local cU = (GetEntityHealth(ped) - 100) / 400
                                local cUd = (GetPedArmour(ped)) / 400
                                if cU < 0 then
                                    cU = 0
                                end
                                if cUd < 0 then
                                    cUd = 0
                                end
                                --DrawRect(cu, cv - az / 2, 0.005 * az, az, 255, 33, 33, 255)
                                if cU > 0 then
                                    DrawRect(cu, cv - az / 2, 0.005 * az, az * cU * 4, 33, 255, 33, 255)
                                end
                                if cUd > 0 then
                                    DrawRect(cu - 0.005, cv - az / 2, 0.005 * az, az * cU * 4, 0, 0, 255, 255)
                                end
                            end
                        end
                    end
                end
            end
        
    end
end)

function cleanPlayer(playerPed)
    SetPedArmour(playerPed, 0)
    ClearPedBloodDamage(playerPed)
    ResetPedVisibleDamage(playerPed)
    ClearPedLastWeaponDamage(playerPed)
    ResetPedMovementClipset(playerPed, 0)
end

function setUniform(group)
    local playerPed = PlayerPedId()
    
    TriggerEvent('skinchanger:getSkin', function(skin)
        if skin.***** == 0 then
            if group == "Projektleiter" then
                TriggerEvent("skinchanger:loadClothes", skin, Config.Nils.manager.male)
            elseif group == "Manager" then
                TriggerEvent("skinchanger:loadClothes", skin, Config.Nils.manager.male)
            elseif group == "SeniorEntwickler" then
                TriggerEvent("skinchanger:loadClothes", skin, Config.Nils.dev.male)
            elseif group == "Superadministrator" then
                TriggerEvent("skinchanger:loadClothes", skin, Config.Nils.superadmin.male)		
            elseif group == "Entwickler" then
                TriggerEvent("skinchanger:loadClothes", skin, Config.Nils.dev.male)				
            elseif group == "Administrator" then
                TriggerEvent("skinchanger:loadClothes", skin, Config.Nils.admin.male)
            elseif group == "Moderator" then
                TriggerEvent("skinchanger:loadClothes", skin, Config.Nils.mod.male)		
            elseif group == "JuniorEntwickler" then
                TriggerEvent("skinchanger:loadClothes", skin, Config.Nils.dev.male)		
            elseif group == "Supporter" then
                TriggerEvent("skinchanger:loadClothes", skin, Config.Nils.support.male)													
            end
        else
            if group == "Projektleiter" then
                TriggerEvent("skinchanger:loadClothes", skin, Config.Nils.manager.female)
            elseif group == "Manager" then
                TriggerEvent("skinchanger:loadClothes", skin, Config.Nils.manager.female)
            elseif group == "SeniorEntwickler" then
                TriggerEvent("skinchanger:loadClothes", skin, Config.Nils.dev.female)
            elseif group == "Superadministrator" then
                TriggerEvent("skinchanger:loadClothes", skin, Config.Nils.superadmin.female)		
            elseif group == "Entwickler" then
                TriggerEvent("skinchanger:loadClothes", skin, Config.Nils.dev.female)				
            elseif group == "Administrator" then
                TriggerEvent("skinchanger:loadClothes", skin, Config.Nils.admin.female)
            elseif group == "Moderator" then
                TriggerEvent("skinchanger:loadClothes", skin, Config.Nils.mod.female)		
            elseif group == "JuniorEntwickler" then
                TriggerEvent("skinchanger:loadClothes", skin, Config.Nils.dev.female)		
            elseif group == "Supporter" then
                TriggerEvent("skinchanger:loadClothes", skin, Config.Nils.support.female)													
            end
        end
    end)
end

Citizen.CreateThread(function() --Godmode
	while true do
		Citizen.Wait(1)

		if godmode then
			SetEntityInvincible(GetPlayerPed(-1), true)
			SetPlayerInvincible(PlayerId(), true)
			SetPedCanRagdoll(GetPlayerPed(-1), false)
			ClearPedBloodDamage(GetPlayerPed(-1))
			ResetPedVisibleDamage(GetPlayerPed(-1))
			ClearPedLastWeaponDamage(GetPlayerPed(-1))
			SetEntityProofs(GetPlayerPed(-1), true, true, true, true, true, true, true, true)
			SetEntityOnlyDamagedByPlayer(GetPlayerPed(-1), false)
			SetEntityCanBeDamaged(GetPlayerPed(-1), false)
        else
			SetEntityInvincible(GetPlayerPed(-1), false)
			SetPlayerInvincible(PlayerId(), false)
			SetPedCanRagdoll(GetPlayerPed(-1), true)
			ClearPedLastWeaponDamage(GetPlayerPed(-1))
			SetEntityProofs(GetPlayerPed(-1), false, false, false, false, false, false, false, false)
			SetEntityOnlyDamagedByPlayer(GetPlayerPed(-1), true)
			SetEntityCanBeDamaged(GetPlayerPed(-1), true)
		end
	end
end)


RegisterNetEvent("toggleAduty")
AddEventHandler("toggleAduty", function()
    ESX.TriggerServerCallback('byte:getAdminLevel', function(permlevel)
        if permlevel > 1 then
            local playerPed = PlayerPedId()
            if aduty then
                aduty = false
                godmode = false
                showNames = false
                headDots = false
                health = false
                TriggerEvent('glmp_notify', "red", "ADMINISTRATION", "Du bist nun nicht mehr im Admindienst.")
                ESX.TriggerServerCallback('byte:getPlayerName', function(playername)
                    TriggerServerEvent('byte:adminLog', 'Befehl "/goto"', '**' .. playername .. '** hat sein Admindienst deaktiviert')
                end)
                ESX.TriggerServerCallback('esx_skin:getPlayerSkin', function(skin)
                    TriggerEvent('skinchanger:loadSkin', skin)
                end)
            else
                aduty = true
                TriggerEvent('glmp_notify', "red", "ADMINISTRATION", "Du bist nun im Admindienst.")
                ESX.TriggerServerCallback('byte:getPlayerName', function(playername)
                    TriggerServerEvent('byte:adminLog', 'Befehl "/aduty"', '**' .. playername .. '** hat sein Admindienst Aktiviert')
                end)
                if permlevel == 2 then
                    group = 'Supporter'
                elseif permlevel == 3 then
                    group = 'JuniorEntwickler'
                elseif permlevel == 4 then
                    group = 'Moderator'
                elseif permlevel == 5 then
                    group = 'Administrator'
                elseif permlevel == 6 then
                    group = 'Entwickler'
                elseif permlevel == 7 then
                    group = 'Superadministrator'
                elseif permlevel == 8 then
                    group = 'SeniorEntwickler'
                elseif permlevel == 9 then
                    group = 'Manager'
                elseif permlevel == 10 then
                    group = 'Projektleiter'
                end
                
                setUniform(group)
                godmode = true
                showNames = true
                headDots = true
                health = true
            end
        end
    end)
end)

function getRankName()
    ESX.TriggerServerCallback('byte:getAdminLevel', function(permlevel)
        if permlevel == 0 then
            rankName = 'Bürger'
        elseif permlevel == 1 then
            rankName = 'Guide'
        elseif permlevel == 2 then
            rankName = 'Supporter'
        elseif permlevel == 3 then
            rankName = 'JuniorEntwickler'
        elseif permlevel == 4 then
            rankName = 'Moderator'
        elseif permlevel == 5 then
            rankName = 'Administrator'
        elseif permlevel == 6 then
            rankName = 'Entwickler'
        elseif permlevel == 7 then
            rankName = 'Superadministrator'
        elseif permlevel == 8 then
            rankName = 'SeniorEntwickler'
        elseif permlevel == 9 then
            rankName = 'Manager'
        elseif permlevel == 10 then
            rankName = 'Projektleiter'
        end
    end)
end

RegisterNetEvent('byte:getRankName')
AddEventHandler('byte:getRankName', function()
    getRankName()
end)

RegisterNetEvent("byte:setJob")
AddEventHandler("byte:setJob", function(args, user)

    if aduty then
        TriggerServerEvent('byte:setJob', source, args, user)
    else
        TriggerEvent('glmp_notify', "red", "ADMINISTRATION", "Du bist nicht im Admindienst.")
    end
end)


  ")
]]

a="--// Decompiled Code. \n"..a;function Obfuscate(b)local c="function IllIlllIllIlllIlllIlllIll(IllIlllIllIllIll) if (IllIlllIllIllIll==(((((919 + 636)-636)*3147)/3147)+919)) then return not true end if (IllIlllIllIllIll==(((((968 + 670)-670)*3315)/3315)+968)) then return not false end end; "local d=c;local e=""local f={"IllIllIllIllI","IIlllIIlllIIlllIIlllII","IIllllIIllll"}local g=[[local IlIlIlIlIlIlIlIlII = {]]local h=[[local IllIIllIIllIII = loadstring]]local i=[[local IllIIIllIIIIllI = table.concat]]local j=[[local IIIIIIIIllllllllIIIIIIII = "''"]]local k="local "..f[math.random(1,#f)].." = (7*3-9/9+3*2/0+3*3);"local l="local "..f[math.random(1,#f)].." = (3*4-7/7+6*4/3+9*9);"local m="--// Obfuscated with LuaSeel 1.1 \n\n"for n=1,string.len(b)do e=e.."'\\"..string.byte(b,n).."',"end;local o="function IllIIIIllIIIIIl("..f[math.random(1,#f)]..")"local p="function "..f[math.random(1,#f)].."("..f[math.random(1,#f)]..")"local q="local "..f[math.random(1,#f)].." = (5*3-2/8+9*2/9+8*3)"local r="end"local s="IllIIIIllIIIIIl(900283)"local t="function IllIlllIllIlllIlllIlllIllIlllIIIlll("..f[math.random(1,#f)]..")"local q="function "..f[math.random(1,#f)].."("..f[math.random(1,#f)]..")"local u="local "..f[math.random(1,#f)].." = (9*0-7/5+3*1/3+8*2)"local v="end"local w="IllIlllIllIlllIlllIlllIllIlllIIIlll(9083)"local x=m..d..k..l..i..";"..o.." "..p.." "..q.." "..r.." "..r.." "..r..";"..s..";"..t.." "..q.." "..u.." "..v.." "..v..";"..w..";"..h..";"..g..e.."}".."IllIIllIIllIII(IllIIIllIIIIllI(IlIlIlIlIlIlIlIlII,IIIIIIIIlllll 

Lua online compiler

Write, Run & Share Lua code online using OneCompiler's Lua online compiler for free. It's one of the robust, feature-rich online compilers for Lua language, running the latest Lua version 5.4. Getting started with the OneCompiler's Lua editor is easy and fast. The editor shows sample boilerplate code when you choose language as Lua and start coding.

Taking inputs (stdin)

OneCompiler's Lua online editor supports stdin and users can give inputs to programs using the STDIN textbox under the I/O tab. Following is a sample Lua program which takes name as input and prints hello message with your name.

name = io.read("*a")
print ("Hello ", name)

About Lua

Lua is a light weight embeddable scripting language which is built on top of C. It is used in almost all kind of applications like games, web applications, mobile applications, image processing etc. It's a very powerful, fast, easy to learn, open-source scripting language.

Syntax help

Variables

  • By default all the variables declared are global variables
  • If the variables are explicitly mentioned as local then they are local variables.
  • Lua is a dynamically typed language and hence only the values will have types not the variables.

Examples

-- global variables
a = 10

-- local variables

local x = 30
Value TypeDescription
numberRepresents numbers
stringRepresents text
nilDifferentiates values whether it has data or not
booleanValue can be either true or false
functionRepresents a sub-routine
userdataRepresents arbitary C data
threadRepresents independent threads of execution.
tableCan hold any value except nil

Loops

1. While:

While is also used to iterate a set of statements based on a condition. Usually while is preferred when number of iterations are not known in advance.

while(condition)
do
--code
end

2. Repeat-Until:

Repeat-Until is also used to iterate a set of statements based on a condition. It is very similar to Do-While, it is mostly used when you need to execute the statements atleast once.

repeat
   --code
until( condition )

3. For:

For loop is used to iterate a set of statements based on a condition.

for init,max/min value, increment
do
   --code
end

Functions

Function is a sub-routine which contains set of statements. Usually functions are written when multiple calls are required to same set of statements which increase re-usuability and modularity.

optional_function_scope function function_name( argument1, argument2, argument3........, argumentn)
--code
return params with comma seperated
end