2
2
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
_____ _ _ __ __ _
|_ _| | | | | | \/ | | |
| | _ __ ___| |_ __ _ _ __ | |_ | \ / | ___ __| |____
| | | '_ \/ __| __/ _` | '_ \| __| | |\/| |/ _ \ / _` |_ /
_| |_| | | \__ \ || (_| | | | | |_ | | | | (_) | (_| |/ /
|_____|_| |_|___/\__\__,_|_| |_|\__| |_| |_|\___/ \__,_/___|
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
How to use the menu ? You need a lua executor to inject it, the best is redENGINE
you can buy here: www.instant-modz.com
www.instant-modz.com / Buy the best FiveM Lua Executor to use this menu
www.instant-modz.com / Buy the best FiveM Lua Executor to use this menu
www.instant-modz.com / Buy the best FiveM Lua Executor to use this menu
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
]] print("www.instant-modz.com")
CreateThread(function()
local rE = {}
bYPASStiAGo = {
Events = {
"anticheese",
"anticheat",
"antilynx",
"discordbot",
"EasyAdmin:CaptureScreenshot",
"screenshot",
"cheat",
"ncpp",
"ViolationDetected",
"godModePass",
"godModeFail",
"adminGodmodeCheck",
"illegalWeapon",
"ybn_ac",
"x_anticheat",
"CMG:ban",
"Choco:",
"alpha-tango-golf",
"AC_SYNC:BAN",
"foundyou",
"AntiBlips",
"AntiSpectate",
"CarlosLR-AC",
"globalAC:trigger",
"NWAC",
"AC:Sanction",
"ChXa"
},
Args = {
{"This player tried to bypass the anticheat", "ChocoHax"},
{"This player tried to stop the anticheat", "ChocoHax"},
{"This player injected a mod menu", "ChocoHax"},
{"🍫 AntiChocoStop", "ChocoHax"},
{"🍫 AntiTeleport", "ChocoHax"},
{"AntiSpectate", "ChocoHax"},
{"AntiBlips", "ChocoHax"},
{"🍫 Secly", "ChocoHax"},
{"ChocoHax", "ChocoHax"},
{"HentaiCore", "HentaiCore"},
{"`ForceSocialClubUpdate` Removal", "ATG"},
{"Ham Mafia Executor Detected", "ATG"},
{"Table Emptying in Resource", "ATG"},
{"Malicious Function Usage", "ATG"},
{"Player Health above MAX", "ATG"},
{"Weapon Damage Modified", "ATG"},
{"Anti-Resource-Restart", "ATG"},
{"Manipulation Detected", "ATG"},
{"Native Draw Detection", "ATG"},
{"Inventory Exploiting", "ATG"},
{"RedENGINE detection", "ATG"},
{"Injection detected", "ATG"},
{"BlacklistedWeapon:", "ATG"},
{"Anti-Resource-Stop", "ATG"},
{"Godmode Activated", "ATG"},
{"AntiModelChanger", "ATG"},
{"Infinite Health", "ATG"},
{"Menu Detection", "ATG"},
{"Cheat Engine", "ATG"},
{"#GetHammed", "ATG"},
{"Native Function", "Sanction"},
{"BAN", "Sanction"}
},
tfi = TriggerServerEventInternal,
global = _G
}
function bYPASStiAGo:CheckEvent(event)
for k, v in pairs(bYPASStiAGo.Events) do
if event:lower():find(v:lower(), 1, true) then
return true
end
end
return false
end
function bYPASStiAGo:CheckArgs(args)
for k, v in pairs(args) do
if type(v) == "string" then
for z, x in pairs(bYPASStiAGo.Args) do
if x[1]:lower():find(v:lower(), 1, true) then
return true
end
end
end
end
return false
end
function TriggerServerEventInternal(event, payload, length)
if bYPASStiAGo:CheckEvent(event) then
return
end
local unpacked_payload = msgpack.unpack(payload)
if bYPASStiAGo:CheckArgs(unpacked_payload) then
return
end
return Citizen.InvokeNative(0x7FDD1128, event, payload, length)
end
CreateThread(
function()
for k, v in ipairs(bYPASStiAGo.global) do
if k == "TriggerClientEventInt" or k == "HandleConfig" then
table.remove(bYPASStiAGo.global, v)
end
end
while true do
_G = bYPASStiAGo.global
Wait(0)
end
end
)
CreateThread(function()
local frozen_ents = {}
local frozen_players = {}
local friends = {}
local camX, camY, camZ
local lift_height = 0.0
local lift_inc = 0.1
local rc_camX, rc_camY, rc_camZ
local notifications_h = 64
local dict = {
Citizen = Citizen,
math = math,
string = string,
type = type,
tostring = tostring,
tonumber = tonumber,
json = json,
utf8 = utf8,
pairs = pairs,
ipairs = ipairs
}
dict.Citizen.IN = Citizen.InvokeNative
local FM = {
DynamicTriggers = {},
Painter = {},
Util = {},
Categories = {},
List = {},
PlayerCache = {},
Config = {
Vehicle = {
Boost = 1.0
},
Player = {
CrossHair = false,
Blips = true,
ESP = true,
ESPDistance = 1000.0,
Box = false,
Bone = false,
OneTap = false,
Aimbot = false,
AimbotNeedsLOS = true,
TriggerBotNeedsLOS = true,
TPAimbot = false,
TPAimbotThreshold = 40.0,
TPAimbotDistance = 2.0,
RageBot = false,
TriggerBot = false,
NoDrop = false,
AimbotFOV = 90.0,
AimbotBone = 1,
AimbotKey = "MOUSE1",
AimbotReleaseKey = "LEFTALT",
TriggerBotDistance = 500.0,
TargetInsideVehicles = false
},
UseBackgroundImage = true,
UseSounds = true,
UseAutoWalk = false,
UseAutoWalkAlt = false,
ShowKey = "TAB",
FreeCamKey = "HOME",
RCCamKey = "=",
DisableKey = "-",
ShowText = true,
SafeMode = true,
MenuX = 300,
MenuY = 300,
NotifX = nil,
NotifY = nil,
NotifW = 420,
CurrentSelection = 1,
SelectedCategory = "category_1",
UsePrintMessages = false
},
Name = "Tiago Bypass",
Version = "1.2.2c",
Enabled = true,
Showing = false,
Base64 = {},
Tertiary = {193, 0, 19, 255},
MenuW = 923,
MenuH = 583,
DraggingX = nil,
DraggingY = nil,
CurrentPlayer = nil
}
local known_returns = {
["That file doesn't exist."] = true,
["Error opening file."] = true,
["Tried to save but data was null."] = true,
["Error deleting config. It doesn't exist."] = true,
["Successfully saved config."] = true,
["Successfully deleted config."] = true
}
for _ in dict.pairs(tab) do
c = c + 1
end
return c
end
FM.Base64.CharList =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
function FM.Base64:Encode(data)
return (data:gsub(".", function(x)
local r, b = "", x:byte()
for i = 8, 1, -1 do
r = r .. (b % 2 ^ i - b % 2 ^ (i - 1) > 0 and '1' or '0')
end
return r
end) .. "0000"):gsub("%d%d%d?%d?%d?%d?", function(x)
if (#x < 6) then return '' end
local c = 0
for i = 1, 6 do
c = c + (x:sub(i, i) == '1' and 2 ^ (6 - i) or 0)
end
return self.CharList:sub(c + 1, c + 1)
end) .. ({'', '==', '='})[#data % 3 + 1]
end
function FM:SetConfigList()
if _Executor ~= "redENGINE" then return end
HandleConfig("save", "__fm_config_list.json", dict.json.encode(FM.List))
end
function FM:BuildIdentifier()
if _Executor ~= "redENGINE" then return end
local out = HandleConfig("load", "__fm_statistics.identifier")
if out == "That file doesn't exist." or out == "Error opening file." then
local identifier = FM.Base64:Encode("Name=" ..
FM:GetFunction("GetPlayerName")(FM:GetFunction("PlayerId")()) .. ":Seed=" ..
dict.math.random(5, 5 ^ 3) .. ":Build=" .. FM.Version)
HandleConfig("save", "__fm_statistics.identifier", identifier)
FM.Identifier = identifier
return
end
FM.Identifier = out
end
function FM:GetConfigList()
if _Executor ~= "redENGINE" then return {} end
local out = HandleConfig("load", "__fm_config_list.json")
if out == "That file doesn't exist." or out == "Error opening file." then
FM.List = {
[current_config] = 1
}
FM:SetConfigList()
return {}
end
if known_returns[out] then
FM:AddNotification("Failed to fetch configs. See console for details.")
FM:Print("[CONFIG] Failed to load config list: ^1" .. out .. "^7")
return {}
else
return dict.json.decode(out) or {}
end
end
function FM:CopyTable(tab)
local out = {}
return out
end
function FM:IsFriend(ped)
local id = FM:GetFunction("NetworkGetPlayerIndexFromPed")(ped)
if not id or id < 0 then return false end
return friends[FM:GetFunction("GetPlayerServerId")(id)]
end
FM.DefaultConfig = FM:CopyTable(FM.Config)
FM.List = FM:GetConfigList()
FM.ConfigClass = {
Load = function(cfg)
if _Executor ~= "redENGINE" then return FM:AddNotification("INFO",
"Your build (" .. _Executor_Strings[_Executor] .. ") does not support custom
configs.", 15000) end
local out = HandleConfig("load", (cfg or current_config) .. ".json")
return FM.ConfigClass.Save(true)
end
if known_returns[out] then
FM:Print("[CONFIG] Failed to load ^3" .. (cfg or current_config) ..
"^7: ^1" .. out .. "^7")
return false
end
return true
end,
Write = function(name, cfg)
if _Executor ~= "redENGINE" then return end
cfg = FM:CopyTable(cfg)
cfg.Player.AimbotTarget = nil
cfg.SafeMode = nil
cfg = dict.json.encode(cfg)
local out = HandleConfig("save", name .. ".json", cfg)
local boundaryIdx = 1
return table.unpack(v)
end
local v = table.pack(wrap(...))
bfn(boundary, nil)
return table.unpack(v)
end
end
for _, v in dict.ipairs(t) do
r[v] = true
end
return r
end
local blocked_ranges = {{0x0001F601, 0x0001F64F}, {0x00002702, 0x000027B0},
{0x0001F680, 0x0001F6C0}, {0x000024C2, 0x0001F251}, {0x0001F300, 0x0001F5FF},
{0x00002194, 0x00002199}, {0x000023E9, 0x000023F3}, {0x000025FB, 0x000026FD},
{0x0001F300, 0x0001F5FF}, {0x0001F600, 0x0001F636}, {0x0001F681, 0x0001F6C5},
{0x0001F30D, 0x0001F567}, {0x0001F980, 0x0001F984}, {0x0001F910, 0x0001F918},
{0x0001F6E0, 0x0001F6E5}, {0x0001F920, 0x0001F927}, {0x0001F919, 0x0001F91E},
{0x0001F933, 0x0001F93A}, {0x0001F93C, 0x0001F93E}, {0x0001F985, 0x0001F98F},
{0x0001F940, 0x0001F94F}, {0x0001F950, 0x0001F95F}, {0x0001F928, 0x0001F92F},
{0x0001F9D0, 0x0001F9DF}, {0x0001F9E0, 0x0001F9E6}, {0x0001F992, 0x0001F997},
{0x0001F960, 0x0001F96B}, {0x0001F9B0, 0x0001F9B9}, {0x0001F97C, 0x0001F97F},
{0x0001F9F0, 0x0001F9FF}, {0x0001F9E7, 0x0001F9EF}, {0x0001F7E0, 0x0001F7EB},
{0x0001FA90, 0x0001FA95}, {0x0001F9A5, 0x0001F9AA}, {0x0001F9BA, 0x0001F9BF},
{0x0001F9C3, 0x0001F9CA}, {0x0001FA70, 0x0001FA73}}
local block_singles = lookupify{0x000000A9, 0x000000AE, 0x0000203C, 0x00002049,
0x000020E3, 0x00002122, 0x00002139, 0x000021A9, 0x000021AA, 0x0000231A, 0x0000231B,
0x000025AA, 0x000025AB, 0x000025B6, 0x000025C0, 0x00002934, 0x00002935, 0x00002B05,
0x00002B06, 0x00002B07, 0x00002B1B, 0x00002B1C, 0x00002B50, 0x00002B55, 0x00003030,
0x0000303D, 0x00003297, 0x00003299, 0x0001F004, 0x0001F0CF, 0x0001F6F3, 0x0001F6F4,
0x0001F6E9, 0x0001F6F0, 0x0001F6CE, 0x0001F6CD, 0x0001F6CF, 0x0001F6CB, 0x00023F8,
0x00023F9, 0x00023FA, 0x0000023, 0x0001F51F, 0x0001F6CC, 0x0001F9C0, 0x0001F6EB,
0x0001F6EC, 0x0001F6D0, 0x00023CF, 0x000002A, 0x0002328, 0x0001F5A4, 0x0001F471,
0x0001F64D, 0x0001F64E, 0x0001F645, 0x0001F646, 0x0001F681, 0x0001F64B, 0x0001F647,
0x0001F46E, 0x0001F575, 0x0001F582, 0x0001F477, 0x0001F473, 0x0001F930, 0x0001F486,
0x0001F487, 0x0001F6B6, 0x0001F3C3, 0x0001F57A, 0x0001F46F, 0x0001F3CC, 0x0001F3C4,
0x0001F6A3, 0x0001F3CA, 0x00026F9, 0x0001F3CB, 0x0001F6B5, 0x0001F6B5, 0x0001F468,
0x0001F469, 0x0001F990, 0x0001F991, 0x0001F6F5, 0x0001F6F4, 0x0001F6D1, 0x0001F6F6,
0x0001F6D2, 0x0002640, 0x0002642, 0x0002695, 0x0001F3F3, 0x0001F1FA, 0x0001F91F,
0x0001F932, 0x0001F931, 0x0001F9F8, 0x0001F9F7, 0x0001F3F4, 0x0001F970, 0x0001F973,
0x0001F974, 0x0001F97A, 0x0001F975, 0x0001F976, 0x0001F9B5, 0x0001F9B6, 0x0001F468,
0x0001F469, 0x0001F99D, 0x0001F999, 0x0001F99B, 0x0001F998, 0x0001F9A1, 0x0001F99A,
0x0001F99C, 0x0001F9A2, 0x0001F9A0, 0x0001F99F, 0x0001F96D, 0x0001F96C, 0x0001F96F,
0x0001F9C2, 0x0001F96E, 0x0001F99E, 0x0001F9C1, 0x0001F6F9, 0x0001F94E, 0x0001F94F,
0x0001F94D, 0x0000265F, 0x0000267E, 0x0001F3F4, 0x0001F971, 0x0001F90E, 0x0001F90D,
0x0001F90F, 0x0001F9CF, 0x0001F9CD, 0x0001F9CE, 0x0001F468, 0x0001F469, 0x0001F9D1,
0x0001F91D, 0x0001F46D, 0x0001F46B, 0x0001F46C, 0x0001F9AE, 0x0001F415, 0x0001F6D5,
0x0001F6FA, 0x0001FA82, 0x0001F93F, 0x0001FA80, 0x0001FA81, 0x0001F97B, 0x0001F9AF,
0x0001FA78, 0x0001FA79, 0x0001FA7A}
function FM:RemoveEmojis(str)
local new = ""
if block_singles[codepoint] then
safe = false
else
for _, range in dict.ipairs(blocked_ranges) do
if range[1] <= codepoint and codepoint <= range[2] then
safe = false
break
end
end
end
if safe then
new = new .. dict.utf8.char(codepoint)
end
end
return new
end
return str
end
local _natives = {
["TriggerEvent"] = {
func = function(eventName, ...)
if not eventName then return end
local payload = msgpack.pack({...})
return dict.Citizen.PointerValueIntInitialized(args[1]),
dict.Citizen.ReturnResultAnyway(), dict.Citizen.ResultAsInteger()
end
},
["FindNextVehicle"] = {
hash = 0x8839120d,
unpack = function(...)
local args = (...)
return args[1]
end
},
["FindFirstPed"] = {
hash = 0xfb012961,
unpack = function(...)
local args = (...)
return dict.Citizen.PointerValueIntInitialized(args[1]),
dict.Citizen.ReturnResultAnyway(), dict.Citizen.ResultAsInteger()
end
},
["FindNextPed"] = {
hash = 0xab09b548,
unpack = function(...)
local args = (...)
return args[1]
end
},
["FindFirstObject"] = {
hash = 0xFAA6CB5D,
unpack = function(...)
local args = (...)
return dict.Citizen.PointerValueIntInitialized(args[1]),
dict.Citizen.ReturnResultAnyway(), dict.Citizen.ResultAsInteger()
end
},
["FindNextObject"] = {
hash = 0x4E129DBF,
unpack = function(...)
local args = (...)
return args[1]
end
},
["GetPlayerServerId"] = {
hash = 0x4d97bcc7,
unpack = function(...)
local args = (...)
return x, y, z, dict.Citizen.ReturnResultAnyway()
end
},
["GetEntityCoords"] = {
hash = 0x3FEF770D40960D5A,
unpack = function(...)
local args = (...)
return dict.Citizen.PointerValueIntInitialized(args[1])
end
},
["GetNuiCursorPosition"] = {
hash = 0xbdba226f,
unpack = function() return dict.Citizen.PointerValueInt(),
dict.Citizen.PointerValueInt() end
},
["DoesEntityExist"] = {
hash = 0x7239B21A38F536BA,
unpack = function(...)
local args = (...)
return dict.Citizen.PointerValueIntInitialized(args[1])
end
},
["DeleteEntity"] = {
hash = 0xAE3CBE5BF394C9C9,
unpack = function(...)
local args = (...)
return dict.Citizen.PointerValueIntInitialized(args[1])
end
},
["DeleteObject"] = {
hash = 0x539E0AE3E6634B9F,
unpack = function(...)
local args = (...)
return dict.Citizen.PointerValueIntInitialized(args[1])
end
},
["DeleteVehicle"] = {
hash = 0xEA386986E786A54F,
unpack = function(...)
local args = (...)
return dict.Citizen.PointerValueIntInitialized(args[1])
end
},
["NetworkRequestControlOfEntity"] = {
hash = 0xB69317BF5E782347,
unpack = function(...)
local args = (...)
return x, y, z, dict.Citizen.PointerValueFloat(),
dict.Citizen.PointerValueFloat(), dict.Citizen.ReturnResultAnyway()
end
},
["NetworkIsPlayerTalking"] = {
hash = 0x031E11F3D447647E,
unpack = function(...)
local args = (...)
local _bad = {}
local _empty = function() end
return _empty
end
function FM:GetFunction(name)
if not _natives[name] then return bad(name) end
if _natives[name].func then
return _natives[name].func
elseif _natives[name].hash then
_natives[name].func = function(...)
local args = {...}
local data = _natives[name]
local hash = data.hash
if data.unpack then
if data.return_as then return
data.return_as(dict.Citizen.IN(hash, data.unpack(args))) end
return _natives[name].func
end
end
FM.Keys = {
["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,
["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,
["UP"] = 172,
["DOWN"] = 173,
["NENTER"] = 201,
["MWHEELUP"] = 15,
["MWHEELDOWN"] = 14,
["N4"] = 108,
["N5"] = 60,
["N6"] = 107,
["N+"] = 96,
["N-"] = 97,
["N7"] = 117,
["N8"] = 61,
["N9"] = 118,
["MOUSE1"] = 24,
["MOUSE2"] = 25,
["MOUSE3"] = 348
}
return val
end
function FM:EquipOutfit(data)
local ped = FM:GetFunction("PlayerPedId")()
FM:GetFunction("SetPlayerModel")(FM:GetFunction("PlayerId")(), data.model)
FM:GetFunction("SetPedPropIndex")(ped, 0, data.hat, data.hat_texture, 1)
FM:GetFunction("SetPedPropIndex")(ped, 1, data.glasses,
data.glasses_texture, 1)
FM:GetFunction("SetPedPropIndex")(ped, 2, data.ear, data.ear_texture, 1)
FM:GetFunction("SetPedPropIndex")(ped, 6, data.watch, data.watch_texture,
1)
FM:GetFunction("SetPedPropIndex")(ped, 7, data.wrist, data.wrist_texture,
1)
FM:GetFunction("SetPedComponentVariation")(ped, 0, data.head.draw,
data.head.texture, data.head.palette)
FM:GetFunction("SetPedComponentVariation")(ped, 1, data.beard.draw,
data.beard.texture, data.beard.palette)
FM:GetFunction("SetPedComponentVariation")(ped, 2, data.hair.draw,
data.hair.texture, data.hair.palette)
FM:GetFunction("SetPedComponentVariation")(ped, 3, data.torso.draw,
data.torso.texture, data.torso.palette)
FM:GetFunction("SetPedComponentVariation")(ped, 4, data.legs.draw,
data.legs.texture, data.legs.palette)
FM:GetFunction("SetPedComponentVariation")(ped, 5, data.hands.draw,
data.hands.texture, data.hands.palette)
FM:GetFunction("SetPedComponentVariation")(ped, 6, data.feet.draw,
data.feet.texture, data.feet.palette)
FM:GetFunction("SetPedComponentVariation")(ped, 7, data.accessory_1.draw,
data.accessory_1.texture, data.accessory_1.palette)
FM:GetFunction("SetPedComponentVariation")(ped, 8, data.accessory_2.draw,
data.accessory_2.texture, data.accessory_2.palette)
FM:GetFunction("SetPedComponentVariation")(ped, 9, data.accessory_3.draw,
data.accessory_3.texture, data.accessory_3.palette)
FM:GetFunction("SetPedComponentVariation")(ped, 10, data.mask.draw,
data.mask.texture, data.mask.palette)
FM:GetFunction("SetPedComponentVariation")(ped, 11, data.auxillary.draw,
data.auxillary.texture, data.auxillary.palette)
end
function FM:StealOutfit(player)
local ped = FM:GetFunction("GetPlayerPed")(player)
FM:EquipOutfit({
model = FM:GetFunction("GetEntityModel")(ped),
hat = FM:GetFunction("GetPedPropIndex")(ped, 0),
hat_texture = FM:GetFunction("GetPedPropTextureIndex")(ped, 0),
glasses = FM:GetFunction("GetPedPropIndex")(ped, 1),
glasses_texture = FM:GetFunction("GetPedPropTextureIndex")(ped, 1),
ear = FM:GetFunction("GetPedPropIndex")(ped, 2),
ear_texture = FM:GetFunction("GetPedPropTextureIndex")(ped, 2),
watch = FM:GetFunction("GetPedPropIndex")(ped, 6),
watch_texture = FM:GetFunction("GetPedPropTextureIndex")(ped, 6),
wrist = FM:GetFunction("GetPedPropIndex")(ped, 7),
wrist_texture = FM:GetFunction("GetPedPropTextureIndex")(ped, 3),
head = {
draw = FM:GetFunction("GetPedDrawableVariation")(ped, 0),
texture = FM:GetFunction("GetPedTextureVariation")(ped, 0),
palette = FM:GetFunction("GetPedPaletteVariation")(ped, 0)
},
beard = {
draw = FM:GetFunction("GetPedDrawableVariation")(ped, 1),
texture = FM:GetFunction("GetPedTextureVariation")(ped, 1),
palette = FM:GetFunction("GetPedPaletteVariation")(ped, 1)
},
hair = {
draw = FM:GetFunction("GetPedDrawableVariation")(ped, 2),
texture = FM:GetFunction("GetPedTextureVariation")(ped, 2),
palette = FM:GetFunction("GetPedPaletteVariation")(ped, 2)
},
torso = {
draw = FM:GetFunction("GetPedDrawableVariation")(ped, 3),
texture = FM:GetFunction("GetPedTextureVariation")(ped, 3),
palette = FM:GetFunction("GetPedPaletteVariation")(ped, 3)
},
legs = {
draw = FM:GetFunction("GetPedDrawableVariation")(ped, 4),
texture = FM:GetFunction("GetPedTextureVariation")(ped, 4),
palette = FM:GetFunction("GetPedPaletteVariation")(ped, 4)
},
hands = {
draw = FM:GetFunction("GetPedDrawableVariation")(ped, 5),
texture = FM:GetFunction("GetPedTextureVariation")(ped, 5),
palette = FM:GetFunction("GetPedPaletteVariation")(ped, 5)
},
feet = {
draw = FM:GetFunction("GetPedDrawableVariation")(ped, 6),
texture = FM:GetFunction("GetPedTextureVariation")(ped, 6),
palette = FM:GetFunction("GetPedPaletteVariation")(ped, 6)
},
accessory_1 = {
draw = FM:GetFunction("GetPedDrawableVariation")(ped, 7),
texture = FM:GetFunction("GetPedTextureVariation")(ped, 7),
palette = FM:GetFunction("GetPedPaletteVariation")(ped, 7)
},
accessory_2 = {
draw = FM:GetFunction("GetPedDrawableVariation")(ped, 8),
texture = FM:GetFunction("GetPedTextureVariation")(ped, 8),
palette = FM:GetFunction("GetPedPaletteVariation")(ped, 8)
},
accessory_3 = {
draw = FM:GetFunction("GetPedDrawableVariation")(ped, 9),
texture = FM:GetFunction("GetPedTextureVariation")(ped, 9),
palette = FM:GetFunction("GetPedPaletteVariation")(ped, 9)
},
mask = {
draw = FM:GetFunction("GetPedDrawableVariation")(ped, 10),
texture = FM:GetFunction("GetPedTextureVariation")(ped, 10),
palette = FM:GetFunction("GetPedPaletteVariation")(ped, 10)
},
auxillary = {
draw = FM:GetFunction("GetPedDrawableVariation")(ped, 11),
texture = FM:GetFunction("GetPedTextureVariation")(ped, 11),
palette = FM:GetFunction("GetPedPaletteVariation")(ped, 11)
}
})
end
return true
end
function FM.Util:ValidPlayer(src)
if not src then return false end
if FM:GetFunction("IsModelValid")(modelName) and
FM:GetFunction("IsModelAVehicle")(modelName) then
FM:GetFunction("RequestModel")(modelName)
local _text_input
function FM:DrawTextInput()
if not _text_input or _text_input == "" then return end
FM.Painter:DrawText(_text_input, 4, false, self:ScrW() / 3.25,
self:ScrH() / 2.7, 0.4, FM.Tertiary[1], FM.Tertiary[2], FM.Tertiary[3], 255)
end
self:DrawTextInput()
Wait(0)
end
if FM:GetFunction("UpdateOnscreenKeyboard")() ~= 2 then
if FM.Showing then
FM:DrawMenu()
end
_text_input = nil
local result = FM:GetFunction("GetOnscreenKeyboardResult")()
blockinput = false
FM:GetFunction("CancelOnscreenKeyboard")()
return result
else
if FM.Showing then
FM:DrawMenu()
end
_text_input = nil
blockinput = false
FM:GetFunction("CancelOnscreenKeyboard")()
return nil
end
end
function FM.Util:DeleteEntity(entity)
if not FM:GetFunction("DoesEntityExist")(entity) then return end
FM:GetFunction("NetworkRequestControlOfEntity")(entity)
FM:GetFunction("SetEntityAsMissionEntity")(entity, true, true)
FM:GetFunction("DeletePed")(entity)
FM:GetFunction("DeleteEntity")(entity)
FM:GetFunction("DeleteObject")(entity)
FM:GetFunction("DeleteVehicle")(entity)
end
local sounds = {
["INFO"] = {
times = 3,
name = "DELETE",
dict = "HUD_DEATHMATCH_SOUNDSET"
},
["WARN"] = {
times = 1,
name = "Turn",
dict = "DLC_HEIST_HACKING_SNAKE_SOUNDS"
},
["ERROR"] = {
times = 3,
name = "Hack_Failed",
dict = "DLC_HEIST_BIOLAB_PREP_HACKING_SOUNDS"
}
}
local last_sound = 0
for i = 1, sound.times or 1 do
if sound.name and sound.dict then
FM:GetFunction("PlaySoundFrontend")(-1, sound.name, sound.dict,
false)
end
end
for _, v in dict.ipairs(self.Notifications) do
if (v.RawMsg or v.Message) == msg and not self.Notifications[_ + 1]
then
v.Count = (v.Count or 1) + 1
v.RawMsg = v.RawMsg or v.Message
v.Message = v.RawMsg .. " ~w~(x" .. v.Count .. ")"
v.Duration = (timeout / 1000)
v.Expires = FM:GetFunction("GetGameTimer")() + timeout
return
end
end
local notification = {}
notification.Type = type
notification.Message = msg
notification.Duration = timeout / 1000
notification.Expires = FM:GetFunction("GetGameTimer")() + timeout
self.Notifications[#self.Notifications + 1] = notification
FM:Print("[Notification] [" .. type .. "]" .. ": " .. msg)
end
function FM:DoNetwork(obj)
if not FM:GetFunction("DoesEntityExist")(obj) then return end
local id = FM:GetFunction("ObjToNet")(obj)
FM:GetFunction("NetworkSetNetworkIdDynamic")(id, true)
FM:GetFunction("SetNetworkIdExistsOnAllMachines")(id, true)
FM:GetFunction("SetNetworkIdCanMigrate")(id, false)
function FM:GasPlayer(player)
if FM.Config.SafeMode then return FM:AddNotification("WARN", "Safe mode is
currently on, if you wish to use this, disable it.") end
CreateThread(function()
local ped = FM:GetFunction("GetPlayerPed")(player)
if not FM:GetFunction("DoesEntityExist")(ped) then return end
FM:GetFunction("ClearPedTasksImmediately")(ped)
local dest = FM:GetFunction("GetPedBoneCoords")(ped,
FM:GetFunction("GetPedBoneIndex")(ped, 0), 0.0, 0.0, 0.0, 0.0)
local origin = FM:GetFunction("GetPedBoneCoords")(ped,
FM:GetFunction("GetPedBoneIndex")(ped, 57005), 0.0, 0.0, 0.0, 0.0)
for i = 1, 5 do
FM:GetFunction("AddExplosion")(origin.x + dict.math.random(-1, 1),
origin.y + dict.math.random(-1, 1), origin.z - 1.0, 12, 100.0, true, false, 0.0)
Wait(10)
end
function FM:TazePlayer(player)
local ped = FM:GetFunction("GetPlayerPed")(player)
local destination = FM:GetFunction("GetPedBoneCoords")(ped, 0, 0.0, 0.0,
0.0)
local origin = FM:GetFunction("GetPedBoneCoords")(ped, 57005, 0.0, 0.0,
0.2)
FM:GetFunction("ShootSingleBulletBetweenCoords")(origin.x, origin.y,
origin.z, destination.x, destination.y, destination.z, 1, true,
FM:GetFunction("GetHashKey")("WEAPON_STUNGUN"), FM:GetFunction("PlayerPedId")(),
true, false, 24000.0)
end
function FM:HydrantPlayer(player)
local ped = FM:GetFunction("GetPlayerPed")(player)
local origin = FM:GetFunction("GetPedBoneCoords")(ped, 0, 0.0, 0.0, 0.2)
FM:GetFunction("AddExplosion")(origin.x, origin.y, origin.z - 1.0, 13,
100.0, (FM:GetFunction("IsDisabledControlPressed")(0, FM.Keys["LEFTSHIFT"]) and
false or true), false, 0.0)
end
function FM:FirePlayer(player)
local ped = FM:GetFunction("GetPlayerPed")(player)
local origin = FM:GetFunction("GetPedBoneCoords")(ped, 0, 0.0, 0.0, 0.2)
FM:GetFunction("AddExplosion")(origin.x, origin.y, origin.z - 1.0, 12,
100.0, (FM:GetFunction("IsDisabledControlPressed")(0, FM.Keys["LEFTSHIFT"]) and
false or true), false, 0.0)
end
local crash_model_list = {}
local crash_models = {"hei_prop_carrier_cargo_02a", "p_cablecar_s",
"p_ferris_car_01", "prop_cj_big_boat", "prop_rock_4_big2", "prop_steps_big_01",
"v_ilev_lest_bigscreen", "prop_carcreeper", "apa_mp_h_bed_double_09",
"apa_mp_h_bed_wide_05", "sanchez", "cargobob", "prop_cattlecrush",
"prop_cs_documents_01"} --{"prop_ferris_car_01_lod1", "prop_construcionlamp_01",
"prop_fncconstruc_01d", "prop_fncconstruc_02a", "p_dock_crane_cabl_s",
"prop_dock_crane_01", "prop_dock_crane_02_cab", "prop_dock_float_1",
"prop_dock_crane_lift", "apa_mp_h_bed_wide_05", "apa_mp_h_bed_double_08",
"apa_mp_h_bed_double_09", "csx_seabed_bldr4_", "imp_prop_impexp_sofabed_01a",
"apa_mp_h_yacht_bed_01"}
CreateThread(function()
FM:RequestModelSync(spike_model)
local loaded = 0
for i = 1, #crash_models do
if FM:RequestModelSync(crash_models[i]) then
loaded = loaded + 1
end
end
for i = 1, #crash_models * 5 do
for _ = 1, 2 do
table.insert(crash_models, crash_models[dict.math.random(1,
#crash_models)])
loaded = loaded + 1
end
end
local crash_loop
local notified_crash = {}
CreateThread(function()
local ped = FM:GetFunction("GetPlayerPed")(player)
local playerPos = FM:GetFunction("GetOffsetFromEntityInWorldCoords")
(ped, 0.0, 0.0, 0.0)
local selfPos = FM:GetFunction("GetOffsetFromEntityInWorldCoords")
(FM:GetFunction("PlayerPedId")(), 0.0, 0.0, 0.0)
local dist = FM:GetFunction("GetDistanceBetweenCoords")(playerPos.x,
playerPos.y, playerPos.z, selfPos.x, selfPos.y, selfPos.z, true)
for i = 1, ATT_LIMIT do
if CUR_ATT_COUNT >= ATT_LIMIT or not
FM:GetFunction("DoesEntityExist")(ped) then break end
local method = dict.math.random(1, 2)
if method == 1 then
local model = crash_models[dict.math.random(1, #crash_models)]
local obj = FM:GetFunction("CreateObject")
(FM:GetFunction("GetHashKey")(model), playerPos.x, playerPos.y, playerPos.z, true,
true, true)
if FM:GetFunction("DoesEntityExist")(ent) then
FM:DoNetwork(ent)
FM:GetFunction("AttachEntityToEntity")(ent, ped, 0, 0.0,
0.0, 0.0, 0.0, 0.0, 0.0, false, true, true, 1, false)
FM:GetFunction("SetEntityVisible")(ent, false)
crash_model_list[ent] = true
CUR_ATT_COUNT = CUR_ATT_COUNT + 1
end
end
Wait(0)
end
if bad_obj then
self:AddNotification("ERROR", "Some crash models failed to load.
See console for details.", 10000)
end
notified_crash = {}
FM:CleanupCrash(player, all)
end)
end
local timeout = 0
while true do
if not FM.Enabled then return end
if #crash_model_list == 0 then
FM:AddNotification("INFO", "Cleaned up crash objects.")
crash_loop = nil
return
else
FM:AddNotification("ERROR", "Failed to cleanup " ..
#crash_model_list .. " crash object" .. (#crash_model_list ~= 1 and "s" or "") ..
". Retrying in 5 seconds.")
Wait(5000)
end
end
end)
end
function FM:RapePlayer(player)
if FM.Config.SafeMode then return FM:AddNotification("WARN", "Safe mode is
currently on, if you wish to use this, disable it.") end
CreateThread(function()
local model = FM.FreeCam.SpawnerOptions.PED[dict.math.random(1,
#FM.FreeCam.SpawnerOptions.PED)]
FM:RequestModelSync(model)
FM:GetFunction("RequestAnimDict")("rcmpaparazzo_2")
if FM:GetFunction("IsPedInAnyVehicle")(FM:GetFunction("GetPlayerPed")
(player), true) then
local veh = FM:GetFunction("GetVehiclePedIsIn")
(FM:GetFunction("GetPlayerPed")(player), true)
FM:GetFunction("ClearPedTasksImmediately")
(FM:GetFunction("GetPlayerPed")(player))
while not FM:GetFunction("NetworkHasControlOfEntity")(veh) do
FM:GetFunction("NetworkRequestControlOfEntity")(veh)
Wait(0)
end
for _ = 1, 3 do
local c = FM:GetFunction("GetOffsetFromEntityInWorldCoords")
(FM:GetFunction("GetPlayerPed")(player), 0.0, 0.0, 0.0)
local x, y, z = c.x, c.y, c.z
local rape_ped = FM:GetFunction("CreatePed")(4,
FM:GetFunction("GetHashKey")(model), x, y, z, 0.0, true, false)
FM:GetFunction("SetEntityAsMissionEntity")(rape_ped, true, true)
FM:GetFunction("AttachEntityToEntity")(rape_ped,
FM:GetFunction("GetPlayerPed")(player), 4103, 11816, count, 0.0, 0.0, 0.0, 0.0,
0.0, false, false, false, false, 2, true)
FM:GetFunction("ClearPedTasks")(FM:GetFunction("GetPlayerPed")
(player))
FM:GetFunction("TaskPlayAnim")(FM:GetFunction("GetPlayerPed")
(player), "rcmpaparazzo_2", "shag_loop_poppy", 2.0, 2.5, -1, 49, 0, 0, 0, 0)
FM:GetFunction("SetPedKeepTask")(rape_ped)
FM:GetFunction("SetPedAlertness")(rape_ped, 0.0)
FM:GetFunction("TaskPlayAnim")(rape_ped, "rcmpaparazzo_2",
"shag_loop_a", 2.0, 2.5, -1, 49, 0, 0, 0, 0)
FM:GetFunction("SetEntityInvincible")(rape_ped, true)
count = count - 0.4
end
end)
end
function FM:CarSpamServer()
if FM.Config.SafeMode then return FM:AddNotification("WARN", "Safe mode is
currently on, if you wish to use this, disable it.") end
CreateThread(function()
for _, hash in dict.ipairs(car_spam) do
self:RequestModelSync(hash)
Wait(5)
end
Wait(5)
end
end)
end
local _use_lag_server
local _use_hydrant_loop
local _use_fire_loop
local _use_taze_loop
local _use_delete_loop
local _use_explode_vehicle_loop
local _use_explode_player_loop
local _use_launch_loop
function FM:LaggingServer()
if FM.Config.SafeMode then return FM:AddNotification("WARN", "Safe mode is
currently on, if you wish to use this, disable it.") end
CreateThread(function()
while _use_lag_server do
for _, hash in dict.ipairs(car_spam) do
self:RequestModelSync(hash)
Wait(5)
end
Wait(5)
end
Wait(20)
end
end)
end
function FM:HydrantLoop()
if FM.Config.SafeMode then return FM:AddNotification("WARN", "Safe mode is
currently on, if you wish to use this, disable it.") end
CreateThread(function()
while _use_hydrant_loop do
for _, src in dict.pairs(FM.PlayerCache) do
if not _use_hydrant_loop then break end
src = dict.tonumber(src)
Wait(1)
end
Wait(5)
end
end)
end
function FM:FireLoop()
if FM.Config.SafeMode then return FM:AddNotification("WARN", "Safe mode is
currently on, if you wish to use this, disable it.") end
CreateThread(function()
while _use_fire_loop do
for _, src in dict.pairs(FM.PlayerCache) do
if not _use_fire_loop then break end
src = dict.tonumber(src)
Wait(1)
end
Wait(5)
end
end)
end
function FM:TazeLoop()
if FM.Config.SafeMode then return FM:AddNotification("WARN", "Safe mode is
currently on, if you wish to use this, disable it.") end
CreateThread(function()
while _use_taze_loop do
for _, src in dict.pairs(FM.PlayerCache) do
if not _use_taze_loop then break end
src = dict.tonumber(src)
Wait(1)
end
Wait(5)
end
end)
end
function FM:DeleteLoop()
if FM.Config.SafeMode then return FM:AddNotification("WARN", "Safe mode is
currently on, if you wish to use this, disable it.") end
CreateThread(function()
while _use_delete_loop do
local _veh = FM:GetFunction("IsPedInAnyVehicle") and
FM:GetFunction("GetVehiclePedIsIn")(FM:GetFunction("PlayerPedId")())
Wait(1)
end
Wait(5)
end
end)
end
function FM:ExplodeVehicleLoop()
if FM.Config.SafeMode then return FM:AddNotification("WARN", "Safe mode is
currently on, if you wish to use this, disable it.") end
CreateThread(function()
while _use_explode_vehicle_loop do
local _veh = FM:GetFunction("IsPedInAnyVehicle") and
FM:GetFunction("GetVehiclePedIsIn")(FM:GetFunction("PlayerPedId")())
Wait(1)
end
Wait(5)
end
end)
end
function FM:ExplodePlayerLoop()
if FM.Config.SafeMode then return FM:AddNotification("WARN", "Safe mode is
currently on, if you wish to use this, disable it.") end
CreateThread(function()
while _use_explode_player_loop do
for _, src in dict.pairs(FM.PlayerCache) do
if not _use_explode_player_loop then break end
src = dict.tonumber(src)
Wait(1)
end
Wait(5)
end
end)
end
function FM:LaunchLoop()
if FM.Config.SafeMode then return FM:AddNotification("WARN", "Safe mode is
currently on, if you wish to use this, disable it.") end
CreateThread(function()
while _use_launch_loop do
local _veh = FM:GetFunction("IsPedInAnyVehicle") and
FM:GetFunction("GetVehiclePedIsIn")(FM:GetFunction("PlayerPedId")())
Wait(1)
end
Wait(5)
end
end)
end
if weapon then
FM:GetFunction("GiveWeaponToPed")(ped, FM:GetFunction("GetHashKey")
(weapon), 9000, false, true)
end
FM:GetFunction("SetPedAccuracy")(ped, 100)
return ped
end
function FM:UnlockVehicle(veh)
if not FM:GetFunction("DoesEntityExist")(veh) or not
FM:GetFunction("IsEntityAVehicle")(veh) then return end
if not FM:RequestControlSync(veh) then return FM:AddNotification("ERROR",
"Failed to get network control in time. Please try again.", 5000) end
FM:GetFunction("SetVehicleDoorsLockedForAllPlayers")(veh, false)
FM:GetFunction("SetVehicleDoorsLockedForPlayer")(veh, PlayerId(), false)
FM:GetFunction("SetVehicleDoorsLocked")(veh, false)
FM:AddNotification("SUCCESS", "Vehicle unlocked.", 5000)
end
function FM:DisableVehicle(veh)
if not FM:GetFunction("DoesEntityExist")(veh) or not
FM:GetFunction("IsEntityAVehicle")(veh) then return end
if not FM:RequestControlSync(veh) then return FM:AddNotification("ERROR",
"Failed to get network control in time. Please try again.", 5000) end
SetVehicleUndriveable(veh, true)
SetVehicleWheelWidth(veh, 100.0)
for i = 0, GetVehicleNumberOfWheels(veh) do
SetVehicleWheelTireColliderSize(veh, i, 100.0)
SetVehicleWheelSize(veh, i, 100.0)
SetVehicleWheelTireColliderWidth(veh, i, 100.0)
end
SetVehicleLights(veh, 2)
SetVehicleLightsMode(veh, 2)
SetVehicleEngineTemperature(veh, dict.math.huge + 0.0)
SetVehicleEngineOn(veh, true, true, true)
SetVehicleEngineCanDegrade(veh, true)
ModifyVehicleTopSpeed(veh, 1.0)
FM:AddNotification("SUCCESS", "Vehicle disabled.", 5000)
end
if FM:GetFunction("DoesEntityExist")(driver) then
while FM:GetFunction("DoesEntityExist")(veh) and
FM:GetFunction("GetPedInVehicleSeat")(veh, -1) == driver and timeout <= 25000 do
FM:GetFunction("TaskCombatPed")(who, driver, 0, 16)
timeout = timeout + 100
FM:GetFunction("SetVehicleDoorsLockedForAllPlayers")(veh, false)
FM:GetFunction("SetVehicleDoorsLocked")(veh, 7)
Wait(100)
end
FM:GetFunction("ClearPedTasks")(who)
FM:GetFunction("TaskEnterVehicle")(who, veh, 10000, -1, 2.0, 1, 0)
return false
end
Wait(100)
end
else
FM:GetFunction("TaskEnterVehicle")(who, veh, 10000, -1, 2.0, 1, 0)
return false
end
Wait(100)
end
end
FM:GetFunction("ClearPedTasks")(who)
FM:GetFunction("TaskSetBlockingOfNonTemporaryEvents")(who, false)
FM:GetFunction("SetVehicleEngineOn")(veh, true)
FM:GetFunction("NetworkRequestControlOfEntity")(veh)
FM:GetFunction("SetVehicleDoorsLockedForAllPlayers")(veh, true)
FM:GetFunction("SetVehicleDoorsLocked")(veh, 2)
return true
end
function FM:ScrW()
return self._ScrW
end
function FM:ScrH()
return self._ScrH
end
function FM:Print(...)
local str = (...)
if not FM.Config.UsePrintMessages then return false end
print("[Tiago Menu] " .. str)
return true
end
function FM:GetMousePos()
return self._MouseX, self._MouseY
end
function FM:RequestControlOnce(entity)
if FM:GetFunction("NetworkHasControlOfEntity")(entity) then return true end
FM:GetFunction("SetNetworkIdCanMigrate")
(FM:GetFunction("NetworkGetNetworkIdFromEntity")(entity), true)
return FM:GetFunction("NetworkRequestControlOfEntity")(entity)
end
return true
end
if not t or t == 0 then
aJ(aK)
return
end
local aF = {
handle = aK,
destructor = aJ
}
setmetatable(aF, aE)
local aL = true
repeat
coroutine.yield(t)
aL, t = aI(aK)
until not aL
aF.destructor, aF.handle = nil, nil
aJ(aK)
end)
end
function FM:EnumerateVehicles()
return FM:aG(FM:GetFunction("FindFirstVehicle"),
FM:GetFunction("FindNextVehicle"), FM:GetFunction("EndFindVehicle"))
end
function FM:EnumeratePeds()
return FM:aG(FM:GetFunction("FindFirstPed"), FM:GetFunction("FindNextPed"),
FM:GetFunction("EndFindPed"))
end
function FM:EnumerateObjects()
return FM:aG(FM:GetFunction("FindFirstObject"),
FM:GetFunction("FindNextObject"), FM:GetFunction("EndFindObject"))
end
function FM:GetClosestVehicle(max_dist)
local veh, dist = nil, dict.math.huge
local cur = FM:GetFunction("GetOffsetFromEntityInWorldCoords")
(FM:GetFunction("PlayerPedId")(), 0.0, 0.0, 0.0)
if FM:GetFunction("DoesEntityExist")(vehicle) then
local distance = FM:GetFunction("GetDistanceBetweenCoords")(cur.x,
cur.y, cur.z, this.x, this.y, this.z)
function FM:GetClosestPed(max_dist)
local ped, dist = nil, dict.math.huge
local cur = FM:GetFunction("GetOffsetFromEntityInWorldCoords")
(FM:GetFunction("PlayerPedId")(), 0.0, 0.0, 0.0)
for pedestrian in self:EnumeratePeds() do
local this = FM:GetFunction("GetOffsetFromEntityInWorldCoords")
(pedestrian, 0.0, 0.0, 0.0)
if FM:GetFunction("DoesEntityExist")(pedestrian) then
local distance = FM:GetFunction("GetDistanceBetweenCoords")(cur.x,
cur.y, cur.z, this.x, this.y, this.z)
function FM:GetClosestObject(max_dist)
local obj, dist = nil, dict.math.huge
local cur = FM:GetFunction("GetOffsetFromEntityInWorldCoords")
(FM:GetFunction("PlayerPedId")(), 0.0, 0.0, 0.0)
if FM:GetFunction("DoesEntityExist")(object) then
local distance = FM:GetFunction("GetDistanceBetweenCoords")(cur.x,
cur.y, cur.z, this.x, this.y, this.z)
function FM:DeleteVehicles()
local _veh = FM:GetFunction("IsPedInAnyVehicle") and
FM:GetFunction("GetVehiclePedIsIn")(FM:GetFunction("PlayerPedId")())
CreateThread(function()
for veh in FM:EnumerateVehicles() do
if self:RequestControlSync(veh) and (veh ~= _veh or
FM.Config.OnlineIncludeSelf) then
FM.Util:DeleteEntity(veh)
end
end
end)
end
function FM:RepairVehicle(vehicle)
if vehicle == 0 then return false end
FM:RequestControlOnce(vehicle)
FM:GetFunction("SetVehicleFixed")(vehicle)
return true
end
local was_dragging
was_dragging = drag_id
return wx - dx, wy - dy
end
local scroller_y
if scroller_y ~= my then
scroller_y = my
end
return mpy
end
local text_cache = {}
text_cache[font][scale][str] = {
length = length
}
return length
end
local listing
local color_lists = {}
if bool then
color_lists[id].r = _lerp(0.1, color_lists[id].r, FM.Tertiary[1])
color_lists[id].g = _lerp(0.1, color_lists[id].g, FM.Tertiary[2])
color_lists[id].b = _lerp(0.1, color_lists[id].b, FM.Tertiary[3])
else
color_lists[id].r = _lerp(0.1, color_lists[id].r, 255)
color_lists[id].g = _lerp(0.1, color_lists[id].g, 255)
color_lists[id].b = _lerp(0.1, color_lists[id].b, 255)
end
self:DrawRect(px + x, py + y, w, h, r, g, b, a)
self:DrawText(label, 4, true, px + w / 2, py + y - 5, 0.34,
dict.math.ceil(color_lists[id].r), dict.math.ceil(color_lists[id].g),
dict.math.ceil(color_lists[id].b), 255)
return true
else
return false
end
end
return false
end
local selector
local list_choices = {}
local ret
local lR, lG, lB = 255, 255, 255
local rR, rG, rB = 255, 255, 255
self:DrawText(label, 4, false, px + x, py + y, 0.4, 255, 255, 255, 255)
local width = self:GetTextWidth(label, 4, 0.4)
local left_x, left_y = px + x + (width - 16.0), py + y + 13
list_choices[id].selected = new
ret = true
end
elseif left_active == id .. "_left" then
left_active = nil
end
list_choices[id].selected = new
ret = true
end
elseif right_active == id .. "_right" then
right_active = nil
end
self:DrawText(cur, 4, false, left_x + 27, left_y - 14, 0.4, 255, 255, 255,
255)
self:DrawSprite(left_x + 18, left_y + 2, 38.4, 27.0, 0.0, "commonmenu",
"arrowleft", lR, lG, lB, 255)
self:DrawSprite(left_x + 18 + cur_width + 16.0, left_y + 2, 38.4, 27.0,
0.0, "commonmenu", "arrowright", rR, rG, rB, 255)
return ret
end
local checked
local color_checks = {}
if bool then
color_checks[id].r = _lerp(0.1, color_checks[id].r, FM.Tertiary[1])
color_checks[id].g = _lerp(0.1, color_checks[id].g, FM.Tertiary[2])
color_checks[id].b = _lerp(0.1, color_checks[id].b, FM.Tertiary[3])
color_checks[id].a = _lerp(0.1, color_checks[id].a, 200)
else
color_checks[id].r = _lerp(0.1, color_checks[id].r, 20)
color_checks[id].g = _lerp(0.1, color_checks[id].g, 20)
color_checks[id].b = _lerp(0.1, color_checks[id].b, 20)
color_checks[id].a = _lerp(0.1, color_checks[id].a, 0)
end
if FM.Config.UseSounds then
FM:GetFunction("PlaySoundFrontend")(-1, "CLICK_BACK",
"WEB_NAVIGATION_SOUNDS_PHONE", false)
end
return true
else
return false
end
end
return false
end
local activated
if not w then
w = self:GetTextWidth(label, 4, size or 0.37)
end
if FM.Config.UseSounds then
FM:GetFunction("PlaySoundFrontend")(-1, "CLICK_BACK",
"WEB_NAVIGATION_SOUNDS_PHONE", false)
end
return true
else
return false
end
end
return false
end
function FM.Painter:DrawRect(x, y, w, h, r, g, b, a)
local _w, _h = w / FM:ScrW(), h / FM:ScrH()
local _x, _y = x / FM:ScrW() + _w / 2, y / FM:ScrH() + _h / 2
FM:GetFunction("DrawRect")(_x, _y, _w, _h, r, g, b, a)
end
function FM.Painter:Hovered(x, y, w, h)
local mx, my = FM:GetMousePos()
return true
elseif holding == id and not self:Hovered(x, y, w, h) or not
FM:GetFunction("IsDisabledControlPressed")(0, 24) then
holding = nil
end
return false
end
local clicked
function FM.Painter:Clicked(x, y, w, h)
if clicked then
if not FM:GetFunction("IsDisabledControlPressed")(0, 24) then
clicked = false
end
return false
end
if self:Hovered(x, y, w, h) and
FM:GetFunction("IsDisabledControlJustReleased")(0, 24) then
clicked = true
return true
end
return false
end
function FM:LimitRenderBounds()
local cx, cy = self.Config.MenuX, self.Config.MenuY
cx = self:Clamp(cx, 5, FM:ScrW() - self.MenuW - 5)
cy = self:Clamp(cy, 42, FM:ScrH() - self.MenuH - 5)
local nx, ny = self.Config.NotifX, self.Config.NotifY
self.Config.NotifX = nx
self.Config.NotifY = ny
end
self.Config.MenuX = cx
self.Config.MenuY = cy
end
function FM:SetPedModel(model)
if not self:RequestModelSync(model) then return
self:AddNotification("ERROR", "Couldn't load model ~r~" .. model .. " ~w~in time.")
end
FM:GetFunction("SetPlayerModel")(FM:GetFunction("PlayerId")(), model)
end
function FM:GetPedVehicleSeat(ped)
local vehicle = FM:GetFunction("GetVehiclePedIsIn")(ped, false)
local invehicle = FM:GetFunction("IsPedInAnyVehicle")(ped, false)
if invehicle then
for i = -2, FM:GetFunction("GetVehicleMaxNumberOfPassengers")(vehicle)
do
if (FM:GetFunction("GetPedInVehicleSeat")(vehicle, i) == ped) then
return i end
end
end
return -2
end
function FM:GetModelLength(ent)
local min, max = FM:GetFunction("GetModelDimensions")
(FM:GetFunction("GetEntityModel")(ent))
function FM:GetModelHeight(ent)
local min, max = FM:GetFunction("GetModelDimensions")
(FM:GetFunction("GetEntityModel")(ent))
function FM:Tracker()
if not self.TrackingPlayer then return end
if not FM:GetFunction("DoesEntityExist")(FM:GetFunction("GetPlayerPed")
(self.TrackingPlayer)) then
self.TrackingPlayer = nil
return
end
function FM:DoFrozen()
for src, bool in dict.pairs(frozen_players) do
src = dict.tonumber(src)
local ped = FM:GetFunction("GetPlayerPed")(src)
local blips = {}
function FM:DoBlips(remove)
if remove or not FM.Config.Player.Blips or not FM.Enabled then
if remove or #blips > 0 then
for src, blip in dict.pairs(blips) do
FM:GetFunction("RemoveBlip")(blip)
blips[src] = nil
end
end
return
end
if FM:GetFunction("DoesEntityExist")(FM:GetFunction("GetPlayerPed")
(src)) and not blips[src] and src ~= PlayerId() then
local coords = FM:GetFunction("GetOffsetFromEntityInWorldCoords")
(FM:GetFunction("GetPlayerPed")(src, 0.0, 0.0, 0.0))
local head = FM:GetFunction("GetEntityHeading")
(FM:GetFunction("GetPlayerPed")(src))
local blip = FM:GetFunction("AddBlipForCoord")(coords.x, coords.y,
coords.z)
FM:GetFunction("SetBlipSprite")(blip, 1)
FM:GetFunction("ShowHeadingIndicatorOnBlip")(blip, true)
FM:GetFunction("SetBlipRotation")(blip, dict.math.ceil(head))
FM:GetFunction("SetBlipScale")(blip, 0.87)
FM:GetFunction("SetBlipCategory")(blip, 7)
FM:GetFunction("BeginTextCommandSetBlipName")("STRING")
FM:GetFunction("AddTextComponentSubstringPlayerName")
(FM:GetFunction("GetPlayerName")(src))
FM:GetFunction("EndTextCommandSetBlipName")(blip)
blips[src] = blip
end
end
end
function FM:DoAntiAim()
if not self.Config.Player.AntiAim then return end
function FM:TeleportToWaypoint()
local waypoint = FM:GetFunction("GetFirstBlipInfoId")(8)
if not DoesBlipExist(waypoint) then return FM:AddNotification("ERROR", "No
waypoint!", 5000) end
local coords = FM:GetFunction("GetBlipInfoIdCoord")(waypoint)
CreateThread(function()
for height = 100, -100, -5 do
FM:GetFunction("SetPedCoordsKeepVehicle")
(FM:GetFunction("PlayerPedId")(), coords.x, coords.y, height + 0.0)
local foundGround, zPos = FM:GetFunction("GetGroundZFor_3dCoord")
(coords.x, coords.y, height + 0.0)
if foundGround then
FM:GetFunction("SetPedCoordsKeepVehicle")
(FM:GetFunction("PlayerPedId")(), coords.x, coords.y, zPos + 0.0)
break
end
Wait(5)
end
function FM:DoESP()
if not self.Config.Player.ESP then return end
local spot = FM:GetFunction("GetOffsetFromEntityInWorldCoords")
(FM:GetFunction("PlayerPedId")(), 0.0, 0.0, 0.0)
if self.FreeCam and self.FreeCam.On and camX and camY and camZ then
spot = vector3(camX, camY, camZ)
elseif self.SpectatingPlayer and FM:GetFunction("DoesEntityExist")
(FM:GetFunction("GetPlayerPed")(self.SpectatingPlayer)) then
spot = FM:GetFunction("GetOffsetFromEntityInWorldCoords")
(FM:GetFunction("GetPlayerPed")(self.SpectatingPlayer, 0.0, 0.0, 0.0))
elseif self.RCCam and self.RCCam.On and rc_camX and rc_camY and rc_camZ
then
spot = vector3(rc_camX, rc_camY, rc_camZ)
end
if seat ~= -2 then
seat = seat + 0.25
end
if seat ~= -2 then
pos_z = pos_z + seat
end
local _on_screen, _, _ =
FM:GetFunction("GetScreenCoordFromWorldCoord")(coords.x, coords.y, pos_z)
if _on_screen then
if self.Config.Player.Box then
self:DoBoxESP(src, ped)
end
if FM:GetFunction("NetworkIsPlayerTalking")(src) then
self:Draw3DText(coords.x, coords.y, pos_z, _id .. " | "
.. FM:CleanName(FM:GetFunction("GetPlayerName")(src), true) .. " [" ..
dict.math.ceil(dist) .. "M" .. "]", esp_talk_col[1], esp_talk_col[2],
esp_talk_col[3])
else
self:Draw3DText(coords.x, coords.y, pos_z, _id .. " | "
.. FM:CleanName(FM:GetFunction("GetPlayerName")(src), true) .. " [" ..
dict.math.ceil(dist) .. "M" .. "]", 255, 255, 255)
end
end
end
end
end
end
if FM:GetFunction("NetworkIsPlayerTalking")(src) then
r, g, b = esp_talk_col[1], esp_talk_col[2], esp_talk_col[3]
end
FM:AddCategory("Self", function(self, x, y, w, h)
local curY = 5
if x then
local _y = FM:GetTextInput("Enter Y Coordinate.", 0, 15)
if x and y then
local _z = FM:GetTextInput("Enter Z Coordinate.", 0, 15)
curY = curY + 25
curY = curY + 25
curY = curY + 25
if self.Painter:CheckBox("INFINITE STAMINA",
self.Config.Player.InfiniteStamina, x, y, 5, curY, 200, 20, 255, 255, 255, 255,
"infinite_stamina") then
self.Config.Player.InfiniteStamina = not
self.Config.Player.InfiniteStamina
FM.ConfigClass.Save(true)
end
curY = curY + 25
curY = curY + 25
if self.Painter:CheckBox("INVISIBILITY", self.Config.Player.Invisibility,
x, y, 5, curY, 200, 20, 255, 255, 255, 255, "invisibility_enabled") then
self.Config.Player.Invisibility = not self.Config.Player.Invisibility
FM.ConfigClass.Save(true)
end
curY = curY + 25
curY = curY + 25
if self.Painter:CheckBox("FAST RUN", self.Config.Player.FastRun, x, y, 5,
curY, 200, 20, 255, 255, 255, 255, "fast_af_runna_enabled") then
self.Config.Player.FastRun = not self.Config.Player.FastRun
FM.ConfigClass.Save(true)
end
curY = curY + 25
curY = curY + 25
if self.Config.Player.SuperMan then
FM:AddNotification("INFO", "Press ~y~SPACE~w~ to go up / ~y~W~w~ to
go forward.")
end
end
curY = curY + 25
curY = curY + 25
curY = curY + 25
curY = curY + 20
curY = curY + 25
curY = curY + 25
if self.DynamicTriggers["esx_ambulancejob"] and
self.DynamicTriggers["esx_ambulancejob"]["esx_ambulancejob:revive"] then
if self.Painter:Button("REVIVE ~g~ESX", x, y, 5, curY, 200, 20, 255,
255, 255, 255, "esx_revive") then
FM:GetFunction("TriggerEvent")
(self.DynamicTriggers["esx_ambulancejob"]["esx_ambulancejob:revive"])
FM:AddNotification("INFO", "Revived.")
end
curY = curY + 25
end
FM:AddCategory("ESP", function(self, x, y)
local curY = 5
curY = curY + 25
curY = curY + 25
if self.Painter:CheckBox("BLIPS", self.Config.Player.Blips, x, y, 5, curY,
200, 20, 255, 255, 255, 255, "esp_blips_enabled") then
if self.Config.Player.Blips then
self:DoBlips(true)
end
curY = curY + 25
if self.Painter:CheckBox("CROSSHAIR", self.Config.Player.CrossHair, x, y,
5, curY, 200, 20, 255, 255, 255, 255, "crosshair_enabled") then
self.Config.Player.CrossHair = not self.Config.Player.CrossHair
FM.ConfigClass.Save(true)
end
curY = curY + 20
FM:AddCategory("Combat", function(self, x, y, w, h)
local curY = 5
curY = curY + 25
curY = curY + 25
if self.Painter:CheckBox("AIMBOT", self.Config.Player.Aimbot, x, y, 5,
curY, 200, 20, 255, 255, 255, 255, "aimbot_enabled") then
self.Config.Player.Aimbot = not self.Config.Player.Aimbot
FM.ConfigClass.Save(true)
end
curY = curY + 25
curY = curY + 25
curY = curY + 25
curY = curY + 25
curY = curY + 25
curY = curY + 25
curY = curY + 25
curY = curY + 25
curY = curY + 25
curY = curY + 25
curY = curY + 25
curY = curY + 25
if self.Painter:CheckBox("EXPLOSIVE AMMO",
self.Config.Player.ExplosiveAmmo, x, y, 5, curY, 200, 20, 255, 255, 255, 255,
"explosive_ammo") then
self.Config.Player.ExplosiveAmmo = not self.Config.Player.ExplosiveAmmo
FM.ConfigClass.Save(true)
end
curY = curY + 25
curY = curY + 20
curY = curY + 25
curY = curY + 25
curY = curY + 25
curY = curY + 25
return dir
end
if FM:GetFunction("DoesEntityExist")(entity) and
FM:GetFunction("IsEntityAVehicle")(entity) and
FM.Config.Player.TargetInsideVehicles and
FM:GetFunction("HasEntityClearLosToEntityInFront")(FM:GetFunction("PlayerPedId")(),
entity) then
local driver = FM:GetFunction("GetPedInVehicleSeat")(entity, -1)
if FM:GetFunction("DoesEntityExist")(who) and
FM:GetFunction("IsEntityAPed")(who) and not FM:GetFunction("IsPedDeadOrDying")(who)
then
local s_pos =
FM:GetFunction("GetOffsetFromEntityInWorldCoords")(who, 0.0, 0.0, 0.0)
local s_dist = FM:GetFunction("GetDistanceBetweenCoords")
(hit_pos.x, hit_pos.y, hit_pos.z, s_pos.x, s_pos.y, s_pos.z, true)
if FM:GetFunction("DoesEntityExist")(_ped) and
FM:GetFunction("IsEntityAPed")(_ped) then
entity = _ped
force = true
end
end
end
if hit and FM:GetFunction("DoesEntityExist")(entity) and
FM:GetFunction("DoesEntityHaveDrawable")(entity) and FM:GetFunction("IsEntityAPed")
(entity) and (force or FM:GetFunction("HasEntityClearLosToEntityInFront")
(FM:GetFunction("PlayerPedId")(), entity)) then return true, entity, _seat end
local _aimbot_poly = {}
for i = 1, #poly do
if (poly[i].y < point.y and poly[j].y >= point.y or poly[j].y < point.y
and poly[i].y >= point.y) and (poly[i].x + (point.y - poly[i].y) / (poly[j].y -
poly[i].y) * (poly[j].x - poly[i].x) < point.x) then
inside = not inside
end
j = i
end
return inside
end
return _within_poly({
x = sx,
y = sy
}, _aimbot_poly.points)
end
-- and FM:GetFunction("HasEntityClearLosToEntityInFront")
(FM:GetFunction("PlayerPedId")(), ped) then
if _ped ~= FM:GetFunction("PlayerPedId")() and showing and (not
FM.Config.Player.AimbotNeedsLOS or
FM:GetFunction("HasEntityClearLosToEntityInFront")(FM:GetFunction("PlayerPedId")(),
ped)) then
local in_fov = _is_ped_in_aimbot_fov(_ped)
if FM:GetFunction("IsEntityAVehicle")(entity) then
entity = FM:GetFunction("GetPedInVehicleSeat")(entity, _seat)
end
if hit then
for _, dat in dict.ipairs(bone_check) do
local id = dat[1]
if id ~= -1 then
local bone_coords = FM:GetFunction("GetPedBoneCoords")(ped, id,
0.0, 0.0, 0.0)
local b_dist = FM:GetFunction("GetDistanceBetweenCoords")
(bone_coords.x, bone_coords.y, bone_coords.z, hit_pos.x, hit_pos.y, hit_pos.z,
true)
function FM:DoAimbotPoly()
local sx, sy = _aimbot_poly.sx, _aimbot_poly.sy
local fov = self.Config.Player.AimbotFOV
if not fov then return end
if sx and FM:ScrW() == sx and sy and FM:ScrH() == sy and _aimbot_poly.fov
== self.Config.Player.AimbotFOV then return end
_aimbot_poly.sx = FM:ScrW()
_aimbot_poly.sy = FM:ScrH()
_aimbot_poly.fov = self.Config.Player.AimbotFOV
_aimbot_poly.points = {}
for i = 1, 360 do
local x = dict.math.cos(dict.math.rad(i)) / FM:ScrW()
local y = dict.math.sin(dict.math.rad(i)) / FM:ScrH()
local sx, sy = x * fov, y * fov
_aimbot_poly.points[#_aimbot_poly.points + 1] = {
x = sx + ((FM:ScrW() / 2) / FM:ScrW()),
y = sy + ((FM:ScrH() / 2) / FM:ScrH())
}
end
end
function FM:DrawAimbotFOV()
for _, dat in dict.ipairs(_aimbot_poly.points) do
DrawRect(dat.x, dat.y, 5 / FM:ScrW(), 5 / FM:ScrH(), FM.Tertiary[1],
FM.Tertiary[2], FM.Tertiary[3], 70)
end
end
function FM:_rage_bot()
for ped in FM:EnumeratePeds() do
if FM:GetFunction("DoesEntityExist")(ped) and
FM:GetFunction("IsEntityAPed")(ped) and ped ~= FM:GetFunction("PlayerPedId")() and
not FM:GetFunction("IsPedDeadOrDying")(ped) then
if not FM:IsFriend(ped) and (not FM.Config.Player.OnlyTargetPlayers
or _is_ped_player(ped)) then
if FM.Config.Player.OneTap then
FM:GetFunction("SetPlayerWeaponDamageModifier")
(FM:GetFunction("PlayerId")(), 100.0)
end
if self.Config.ShowText then
self:Draw3DText(where.x, where.y, where.z, "*RAGED*", 255,
55, 70, 255)
end
FM:GetFunction("ShootSingleBulletBetweenCoords")(origin.x,
origin.y, origin.z, destination.x, destination.y, destination.z, 1, true,
FM:GetFunction("GetSelectedPedWeapon")(FM:GetFunction("PlayerPedId")()),
FM:GetFunction("PlayerPedId")(), true, false, 24000.0)
if FM.Config.Player.OneTap then
FM:GetFunction("SetPlayerWeaponDamageModifier")
(FM:GetFunction("PlayerId")(), 1.0)
end
end
end
end
end
function FM:_no_bullet_drop()
if IsDisabledControlPressed(0, FM.Keys["MOUSE1"]) and not FM.Showing and
(not FM.FreeCam.On and not FM.RCCar.CamOn) then
local curWep = FM:GetFunction("GetSelectedPedWeapon")
(FM:GetFunction("PlayerPedId")())
local cur = FM:GetFunction("GetOffsetFromEntityInWorldCoords")
(FM:GetFunction("GetCurrentPedWeaponEntityIndex")(FM:GetFunction("PlayerPedId")()),
0.0, 0.0, 0.0)
local _dir = FM:GetFunction("GetGameplayCamRot")(0)
local dir = rot_to_dir(_dir)
local dist = 99999.9
local len = _multiply(dir, dist)
local targ = cur + len
FM:GetFunction("ShootSingleBulletBetweenCoords")(cur.x, cur.y, cur.z,
targ.x, targ.y, targ.z, 5, 1, curWep, FM:GetFunction("PlayerPedId")(), true, true,
24000.0)
FM:GetFunction("SetPedShootsAtCoord")(FM:GetFunction("PlayerPedId")(),
targ.x, targ.y, targ.z, true)
end
end
function FM:_trigger_bot()
local found, ent, _seat = _get_ped_hovered_over()
-- SKEL_HEAD
if _seat ~= nil then
_bone = 31086
end
if FM.Config.Player.OneTap then
FM:GetFunction("SetPlayerWeaponDamageModifier")
(FM:GetFunction("PlayerId")(), 1.0)
end
end
end
end
function FM:_aimbot()
SetCamAffectsAiming(GetRenderingCam(), false)
local _ped = _get_ped_in_aimbot_fov()
if self.Config.ShowText then
self:Draw3DText(where.x, where.y, where.z, "*AIMBOT LOCKED*", 255,
0, 0, 255)
end
FM:GetFunction("DisableControlAction", 0,
FM.Keys[self.Config.Player.AimbotKey], true)
if FM:GetFunction("IsDisabledControlPressed")(0,
FM.Keys[self.Config.Player.AimbotKey]) then
if FM.Config.Player.OneTap then
FM:GetFunction("SetPlayerWeaponDamageModifier")
(FM:GetFunction("PlayerId")(), 9999.9)
end
FM:GetFunction("SetPedShootsAtCoord")(FM:GetFunction("PlayerPedId")
(), _pos.x, _pos.y, _pos.z, true)
local _on_screen, sx, sy =
FM:GetFunction("GetScreenCoordFromWorldCoord")(_pos.x, _pos.y, _pos.z)
FM:GetFunction("SetCursorLocation")(sx, sy)
if FM.Config.Player.OneTap then
FM:GetFunction("SetPlayerWeaponDamageModifier")
(FM:GetFunction("PlayerId")(), 1.0)
end
end
end
end
function FM:_tp_aimbot()
local them = FM:GetFunction("GetOffsetFromEntityInWorldCoords")
(self.Config.Player.AimbotTarget, 0.0, 0.0, 0.0)
local us = FM:GetFunction("GetOffsetFromEntityInWorldCoords")
(FM:GetFunction("PlayerPedId")(), 0.0, 0.0, 0.0)
local dist = FM:GetFunction("GetDistanceBetweenCoords")(them.x, them.y,
them.z, us.x, us.y, us.z)
function FM:DoAimbot()
if not self.Config.Player.AimbotFOV or not self._ScrW or not self._ScrH
then return end
self:DoAimbotPoly()
if self.Config.Player.AimbotDrawFOV then
self:DrawAimbotFOV()
end
if not FM:GetFunction("IsPlayerFreeAiming")(FM:GetFunction("PlayerId")())
and not FM:GetFunction("IsPedDoingDriveby")(FM:GetFunction("PlayerPedId")()) then
self.Config.Player.AimbotTarget = nil
return
end
if FM:GetFunction("IsDisabledControlJustPressed")(0,
FM.Keys[self.Config.Player.AimbotReleaseKey]) then
self.Config.Player.AimbotTarget = nil
end
if self.Config.Player.RageBot then
self:_rage_bot()
end
if self.Config.Player.TriggerBot then
self:_trigger_bot()
end
if self.Config.Player.NoDrop then
self:_no_bullet_drop()
end
if self.Config.Player.Aimbot then
self:_aimbot()
end
CreateThread(function()
while FM.Enabled do
Wait(0)
FM:DoAimbot()
end
end)
FM:AddCategory("Model", function(self, x, y)
local curY = 0
curY = curY + 25
curY = curY + 25
curY = curY + 25
curY = curY + 25
curY = curY + 25
curY = curY + 25
end)
return false
end
FM:AddCategory("Weapon", function(self, x, y)
local curY = 0
curY = curY + 25
if name then
local wep = _find_weapon(name)
if not wep then return FM:AddNotification("ERROR", "Invalid
weapon.", 5000) end
FM:GetFunction("GiveWeaponToPed")(FM:GetFunction("PlayerPedId")(),
FM:GetFunction("GetHashKey")(wep), 500, false, true)
FM:AddNotification("SUCCESS", "Weapon given!", 10000)
end
end
curY = curY + 25
curY = curY + 25
end)
FM:AddCategory("Vehicle", function(self, x, y)
local curY = 5
curY = curY + 20
curY = curY + 20
curY = curY + 25
curY = curY + 25
curY = curY + 25
curY = curY + 25
curY = curY + 25
curY = curY + 25
FM:AddCategory("Online", function(self, x, y)
local curY = 5
curY = curY + 25
if _use_lag_server then
FM:AddNotification("INFO", "Lagging server!", 10000)
else
FM:AddNotification("INFO", "Stopped lagger.", 10000)
end
end
end
curY = curY + 25
if _use_hydrant_loop then
FM:AddNotification("INFO", "Water for all!", 10000)
else
FM:AddNotification("INFO", "Stopped water.", 10000)
end
end
end
curY = curY + 25
if _use_fire_loop then
FM:AddNotification("INFO", "Fire for all!", 10000)
else
FM:AddNotification("INFO", "Stopped fire.", 10000)
end
end
end
curY = curY + 25
if _use_taze_loop then
FM:AddNotification("INFO", "Tazing for all!", 10000)
else
FM:AddNotification("INFO", "Stopped tazing.", 10000)
end
end
end
curY = curY + 25
if _use_delete_loop then
FM:AddNotification("INFO", "No more cars!", 10000)
else
FM:AddNotification("INFO", "Stopped deleting.", 10000)
end
end
end
curY = curY + 25
curY = curY + 25
if _use_explode_player_loop then
FM:AddNotification("INFO", "ISIS for all!", 10000)
else
FM:AddNotification("INFO", "Stopped exploding.", 10000)
end
end
end
curY = curY + 25
if _use_launch_loop then
FM:AddNotification("INFO", "Time to go to space!", 10000)
else
FM:AddNotification("INFO", "Stopped launching.", 10000)
end
end
end
curY = curY + 20
if FM:GetFunction("IsDisabledControlPressed")(0,
FM.Keys["LEFTSHIFT"]) then
local _msg = FM:GetTextInput("Enter jail reason.", reason,
200)
if _msg then
reason = _msg
end
end
curY = curY + 25
end
curY = curY + 25
curY = curY + 25
curY = curY + 25
CreateThread(function()
FM:RequestModelSync("stt_prop_stunt_track_dwslope30")
if FM:GetFunction("DoesEntityExist")(vehicle) then
FM:GetFunction("AttachEntityToEntity")(ramp,
vehicle, 0, 0, -1.0, 0.0, 0.0, 0, true, true, false, true, 1, true)
end
end
Wait(50)
end
end)
curY = curY + 25
CreateThread(function()
for vehicle in FM:EnumerateVehicles() do
if vehicle ~= _veh or FM.Config.OnlineIncludeSelf then
local building = FM:GetFunction("CreateObject")(-
1404869155, 0, 0, 0, true, true, true)
FM:DoNetwork(ramp)
FM:GetFunction("NetworkRequestControlOfEntity")
(vehicle)
FM:RequestControlOnce(vehicle)
FM:RequestControlOnce(building)
if FM:GetFunction("DoesEntityExist")(vehicle) then
FM:GetFunction("AttachEntityToEntity")(building,
vehicle, 0, 0, -1.0, 0.0, 0.0, 0, true, true, false, true, 1, true)
end
end
Wait(50)
end
end)
curY = curY + 25
curY = curY + 25
curY = curY + 25
if FM:GetFunction("DoesEntityExist")(ped) then
FM.FreeCam.SpawnerOptions["PREMADE"]["SWASTIKA"]
(FM:GetFunction("IsPedInAnyVehicle")(ped) and FM:GetFunction("GetVehiclePedIsIn")
(ped) or ped)
Wait(1000)
end
end
end
end)
curY = curY + 25
if FM:GetFunction("DoesEntityExist")(ped) then
FM:GasPlayer(src)
Wait(1000)
end
end
end
end)
curY = curY + 25
if self.DynamicTriggers["CarryPeople"] and
self.DynamicTriggers["CarryPeople"]["CarryPeople:sync"] then
if self.Painter:Button("CARRY ALL", x, y, 5, curY, 200, 20, 255, 255,
255, 255, "carry_all") then
if FM.Config.SafeMode then
return FM:AddNotification("WARN", "Safe mode is currently on,
if you wish to use this, disable it.")
else
TriggerServerEvent(self.DynamicTriggers["CarryPeople"]
["CarryPeople:sync"], -1, "misfinale_c2mcs_1", "nm", "fin_c2_mcs_1_camman",
"firemans_carry", 0.15, 0.27, 0.63, -1, 100000, 0.0, 49, 33, 1)
FM:AddNotification("INFO", "Carrying all players!", 10000)
end
end
curY = curY + 25
end
if FM:GetFunction("IsDisabledControlPressed")(0,
FM.Keys["LEFTSHIFT"]) then
local _method = FM:GetTextInput("Enter crash method. [object /
ped / both]", "both", 10)
if _method then
method = _method
FM:AddNotification("INFO", "Using " .. method .. " crash
method.")
end
end
CreateThread(function()
for id, src in dict.pairs(FM.PlayerCache) do
src = dict.tonumber(src)
if FM:GetFunction("DoesEntityExist")(ped) then
FM:CrashPlayer(src, true, method)
Wait(500)
end
end
end
end)
local was_godmode
local was_boosted
function FM:DoVehicleRelated()
local curVeh = FM:GetFunction("GetVehiclePedIsIn")
(FM:GetFunction("PlayerPedId")())
if not FM:GetFunction("DoesEntityExist")(curVeh) then return end
if self.Config.Vehicle.BulletProofTires then
FM:GetFunction("SetVehicleTyresCanBurst")(curVeh, false)
was_bulletproof = true
elseif was_bulletproof then
FM:GetFunction("SetVehicleTyresCanBurst")(curVeh, true)
was_bulletproof = false
end
if self.Config.Vehicle.GodMode then
FM:GetFunction("SetEntityInvincible")(curVeh, true)
if FM:GetFunction("IsVehicleDamaged")(curVeh) then
FM:GetFunction("SetVehicleFixed")(curVeh)
end
was_godmode = true
elseif was_godmode then
FM:GetFunction("SetEntityInvincible")(curVeh, false)
was_godmode = false
end
FM:AddCategory("Freecam", function(self, x, y)
local curY = 5
curY = curY + 20
if self.Painter:ListChoice("FREECAM MODE: ", self.FreeCam.ModeNames, x, y,
5, curY, 200, 20, 255, 255, 255, 255, "freecam_mode") then
self.FreeCam.Mode = list_choices["freecam_mode"].selected
self.FreeCam.DraggingEntity = nil
lift_height = 0.0
lift_inc = 0.1
FM.ConfigClass.Save(true)
end
end)
FM:AddCategory("World", function(self, x, y)
local curY = 0
if self.Painter:Button("9/11 BOMBING", x, y, 5, curY, 200, 20, 255, 255,
255, 255, "9_11_bombing") then end -- Fuck you
end)
if e then
_args = e()
else
FM:AddNotification("ERROR", "Execution failed. See console for
details.")
FM:Print("[LUA] Execution Failed (Arguments): ^1" .. r .. "^7")
end
end
amount = dict.tonumber(amount)
local _type = FM:GetTextInput("Enter method. [CL/SV]", "SV", 2)
FM:AddCategory("Lua", function(self, x, y)
local curY = 0
if _trigger then
_run_lua(resource, trigger)
end
curY = curY + 25
end
end
if custom then
local event = self:GetTextInput("Enter trigger.", "", 100)
if custom_lua then
local code = self:GetTextInput("Enter lua code.", "", 2000)
if code then
local e, r = load(code)
if e then
e()
else
FM:AddNotification("ERROR", "Execution failed. See console for
details.")
FM:Print("[LUA] Execution Failed: ^1" .. r .. "^7")
end
end
end
end)
FM:AddCategory("Misc", function(self, x, y, w, h)
local curY = 5
local _width = self.Painter:GetTextWidth("Your build does not support to
use of configs.", 4, 0.4)
if _Executor ~= "redENGINE" then return self.Painter:DrawText("Your build
does not support to use of configs.", 4, true, x + _width, self.Config.MenuY + 100,
0.4, 255, 255, 255, 255) end
_width = self.Painter:GetTextWidth("CURRENT CONFIG: ~y~" ..
current_config:upper(), 4, 0.4)
self.Painter:DrawText("CURRENT CONFIG: ~y~" .. current_config:upper(), 4,
false, (x + w / 2) - (_width / 2), y + curY, 0.4, 255, 255, 255, 255)
curY = curY + 25
_width = self.Painter:GetTextWidth("SELECTED: ~y~" ..
selected_config:upper(), 4, 0.4)
self.Painter:DrawText("SELECTED: ~y~" .. selected_config:upper(), 4, false,
(x + w / 2) - (_width / 2), y + curY, 0.4, 255, 255, 255, 255)
curY = curY + 25
local cl_w = self.Painter:GetTextWidth("NEW CONFIG", 4, 0.4)
if name then
if not name:find("fm_") then
name = "fm_" .. name
end
FM.List[name] = _count(FM.List) + 1
FM:SetConfigList()
FM.ConfigClass.Write(name, FM.DefaultConfig)
FM:AddNotification("SUCCESS", "Config created.", 10000)
end
end
if name then
if not name:find("fm_") then
name = "fm_" .. name
end
FM.List[name] = _count(FM.List) + 1
FM:SetConfigList()
FM.ConfigClass.Write(name, FM.Config)
FM:AddNotification("SUCCESS", "Config cloned.", 10000)
end
end
if new_name then
if not new_name:find("fm_") then
new_name = "fm_" .. new_name
end
selected_config = new_name
FM.List[new_name] = FM.List[old_name] or (_count(FM.List) +
1)
FM.List[old_name] = nil
FM:SetConfigList()
FM.ConfigClass.Rename(old_name, new_name)
FM:AddNotification("SUCCESS", "Config renamed.", 10000)
end
end
curY = curY + 25
end
end)
return -1
end
FM:AddCategory("Settings", function(self, x, y)
local curY = 5
curY = curY + 25
curY = curY + 25
curY = curY + 25
curY = curY + 25
curY = curY + 25
curY = curY + 20
curY = curY + 25
curY = curY + 25
curY = curY + 25
curY = curY + 25
curY = curY + 25
FM:AddCategory("~r~KILL", function(self, x, y)
FM.Showing = false
FM.FreeCam.On = false
FM.RCCar.On = false
FM.Config = {
Player = {},
Vehicle = {}
}
FM:GetFunction("FreezeEntityPosition")(FM:GetFunction("PlayerPedId")(),
false)
FM.Enabled = false
FM:GetFunction("DestroyCam")(FM.FreeCam.Cam)
FM:GetFunction("DestroyCam")(FM.RCCar.Cam)
FM:GetFunction("DestroyCam")(FM.SpectateCam)
FM:GetFunction("ClearPedTasks")(FM:GetFunction("PlayerPedId")())
FM:DoBlips(true)
end)
local scroller_pos
local scroller_size
local old_scroller
local cur_count
local scroller_max
function FM:GetScrollBasis(count)
if count <= 30 then
return 1.0
elseif count <= 40 then
return 1.1
elseif count <= 50 then
return 1.66
elseif count <= 60 then
return 2.22
elseif count <= 70 then
return 2.77
elseif count <= 80 then
return 3.33
elseif count <= 90 then
return 3.88
elseif count <= 100 then
return 4.45
elseif count <= 110 then
return 5.0
else
return count / 13.18
end
end
local halt
local title_color = {
r = 255,
g = 255,
b = 255
}
local mode = 1
title_color.r = r
title_color.g = g
title_color.b = b
elseif mode == 2 then
local r, g, b = _lerp(0.025, title_color.r, 255), _lerp(0.025,
title_color.g, 255), _lerp(0.025, title_color.b, 255)
function FM:DrawMenu()
_do_title_color()
self:LimitRenderBounds()
if self.Config.UseBackgroundImage then
self.Painter:DrawSprite(self.Config.MenuX + (self.MenuW / 2),
self.Config.MenuY + (self.MenuH / 2), self.MenuW, self.MenuH, 0.0, "fm", "menu_bg",
255, 255, 255, 255, true)
end
if friends[FM:GetFunction("GetPlayerServerId")(src)] then
color = {55, 200, 55}
end
plyY = plyY + 23
end
halt = false
if FM:GetFunction("IsPedInAnyVehicle")(ped) and
FM:GetFunction("AreAnyVehicleSeatsFree")(FM:GetFunction("GetVehiclePedIsIn")(ped))
then
FM:GetFunction("SetPedIntoVehicle")
(FM:GetFunction("PlayerPedId")(), FM:GetFunction("GetVehiclePedIsIn")(ped), -2)
else
FM:GetFunction("SetEntityCoords")
(FM:GetFunction("PlayerPedId")(), coords.x, coords.y, coords.z)
end
curY = curY + 20
end
curY = curY + 20
end
curY = curY + 20
end
curY = curY + 20
if self.Painter:Button(frozen_players[self.SelectedPlayer] and
"UNFREEZE" or "FREEZE", self.Config.MenuX + 525 + 113, self.Config.MenuY + 101, 5,
curY, nil, 20, 255, 255, 255, 255, "freeze_player", false, 0.35) then
frozen_players[self.SelectedPlayer] = not
frozen_players[self.SelectedPlayer]
FM:AddNotification("INFO", "Player " ..
(frozen_players[self.SelectedPlayer] and "frozen" or "unfrozen") .. ".", 10000)
end
curY = curY + 20
curY = curY + 20
curY = curY + 20
curY = curY + 20
curY = curY + 20
curY = curY + 20
curY = curY + 20
curY = curY + 20
curY = curY + 20
local friend_text = friends[FM:GetFunction("GetPlayerServerId")
(self.SelectedPlayer)] and "REMOVE FRIEND" or "MARK AS FRIEND"
curY = curY + 20
if self.Painter:Button("STEAL OUTFIT", self.Config.MenuX + 525 +
113, self.Config.MenuY + 101, 5, curY, nil, 20, 255, 255, 255, 255,
"steal_player_outfit", false, 0.35) then
FM:StealOutfit(self.SelectedPlayer)
FM:AddNotification("SUCCESS", "Outfit stolen.", 5000)
end
curY = curY + 20
if FMM then
FM:GetFunction("TriggerServerEvent")
(self.DynamicTriggers["chat"]["_chat:messageEntered"], playa, {0, 0x99, 255}, FMM)
FM:AddNotification("SUCCESS", "Message sent!", 10000)
end
end
curY = curY + 20
end
if FM.Config.SafeMode then
FM:AddNotification("WARN", "Safe mode is currently on, if
you wish to use this, disable it.")
else
if FM:GetFunction("IsDisabledControlPressed")(0,
FM.Keys["LEFTSHIFT"]) then
local _method = FM:GetTextInput("Enter crash method.
[object / ped / both]", "both", 10)
if _method then
method = _method
FM:AddNotification("INFO", "Using " .. method .. "
crash method.")
end
end
if self.Config.CurrentSelection then
self.Categories[self.Config.CurrentSelection].Build(FM,
self.Config.MenuX + 5, self.Config.MenuY + 46, 515 + 113, self.MenuH - 28)
end
end
local last_clean = 0
function FM:Cleanup()
if last_clean <= FM:GetFunction("GetGameTimer")() then
last_clean = FM:GetFunction("GetGameTimer")() + 15000
collectgarbage("collect")
end
end
local was_showing
local was_invis
local was_other_invis = {}
local was_noragdoll
local was_fastrun
local walking
local magic_carpet_obj
local preview_magic_carpet
local magic_riding
local was_infinite_combat_roll
local was_fakedead
local fakedead_timer = 0
local last_afk_move = 0
CreateThread(function()
while FM.Enabled do
Wait(0)
if FM.Config.Player.RevealInvisibles then
for id, src in dict.pairs(FM.PlayerCache) do
src = dict.tonumber(src)
if invis then
FM:GetFunction("SetEntityLocallyVisible")(_ped,
true)
FM:GetFunction("SetEntityAlpha")(_ped, 150)
FM:Draw3DText(where.x, where.y, where.z + 0.3,
"*PLAYER INVISIBLE*", 255, 55, 55, 255)
was_other_invis[src] = true
else
FM:GetFunction("SetEntityAlpha")(_ped, 255)
was_other_invis[src] = false
end
else
FM:GetFunction("SetEntityAlpha")(_ped, 255)
was_other_invis[src] = false
end
end
end
end
end
end)
function FM:DoCrosshair()
if not FM.Config.Player.CrossHair then return end
FM.Painter:DrawRect(FM:ScrW() / 2 - 1, FM:ScrH() / 2 - 7.5, 2, 15,
FM.Tertiary[1], FM.Tertiary[2], FM.Tertiary[3], 255)
FM.Painter:DrawRect(FM:ScrW() / 2 - 7.5, FM:ScrH() / 2 - 1, 15, 2,
FM.Tertiary[1], FM.Tertiary[2], FM.Tertiary[3], 255)
end
local _was_anti_afk
local sort_func = function(srcA, srcB) return srcA - srcB end
CreateThread(function()
while FM.Enabled do
Wait(0)
FM.PlayerCache = FM:GetFunction("GetActivePlayers")()
local w, h = FM:GetFunction("GetActiveScreenResolution")()
local x, y = FM:GetFunction("GetNuiCursorPosition")()
FM._ScrW = w
FM._ScrH = h
FM._MouseX = x
FM._MouseY = y
if w and h and not FM.Config.NotifX and not FM.Config.NotifY then
FM.Config.NotifX = w - FM.Config.NotifW - 20
FM.Config.NotifY = 20
end
FM:Cleanup()
FM:DoESP()
FM:DoAntiAim()
FM:DoVehicleRelated()
FM:DoBlips()
FM:Tracker()
FM:DoFrozen()
FM:DoCrosshair()
local keyboard_open = FM:GetFunction("UpdateOnscreenKeyboard")() ~= -1
and FM:GetFunction("UpdateOnscreenKeyboard")() ~= 1 and
FM:GetFunction("UpdateOnscreenKeyboard")() ~= 2
if not FM:GetFunction("HasStreamedTextureDictLoaded")("commonmenu")
then
FM:GetFunction("RequestStreamedTextureDict")("commonmenu")
end
FM:DrawNotifications()
if FM.Config.Player.AntiAFK then
safe = false
end
if safe then
FM:GetFunction("ClearPedTasks")(FM:GetFunction("PlayerPedId")
())
walking = false
end
end
if FM.Config.Player.AntiAFK then
safe = true
end
if safe then
walking = true
local veh = FM:GetFunction("GetVehiclePedIsIn")
(FM:GetFunction("PlayerPedId")())
if FM:GetFunction("DoesEntityExist")(veh) then
FM:GetFunction("TaskVehicleDriveWander")
(FM:GetFunction("PlayerPedId")(), veh, 40.0, 0)
else
FM:GetFunction("TaskWanderStandard")
(FM:GetFunction("PlayerPedId")(), 10.0, 10)
end
end
end
if FM.Showing then
FM:GetFunction("DisableAllControlActions")(0)
FM:GetFunction("SetMouseCursorActiveThisFrame")()
FM:GetFunction("SetMouseCursorSprite")(1)
FM:DrawMenu()
was_showing = true
elseif was_showing then
if walking and not FM:GetFunction("IsEntityInAir")
(FM:GetFunction("PlayerPedId")()) then
FM:GetFunction("ClearPedTasks")(FM:GetFunction("PlayerPedId")
())
walking = false
end
was_showing = false
end
if FM:GetFunction("IsDisabledControlJustPressed")(0,
FM.Keys[FM.Config.ShowKey]) and not keyboard_open then
FM.Showing = not FM.Showing
end
if FM.Config.Player.ForceRadar then
FM:GetFunction("DisplayRadar")(true)
end
if FM.Config.Player.FakeDead then
FM:GetFunction("SetPedToRagdoll")(FM:GetFunction("PlayerPedId")(),
1000, 1000, 0, true, true, false)
was_fakedead = true
elseif was_fakedead then
walking = false
FM:GetFunction("SetPedToRagdoll")(FM:GetFunction("PlayerPedId")(),
1, 1, 0, true, true, false)
FM:GetFunction("ClearPedTasks")(FM:GetFunction("PlayerPedId")())
was_fakedead = false
fakedead_timer = FM:GetFunction("GetGameTimer")() + 1500
end
if FM.Config.Player.SuperJump then
FM:GetFunction("SetSuperJumpThisFrame")(PlayerId())
end
if FM.Config.Player.Invisibility then
FM:GetFunction("SetEntityVisible")(FM:GetFunction("PlayerPedId")(),
false, false)
FM:GetFunction("SetEntityLocallyVisible")
(FM:GetFunction("PlayerPedId")(), true)
FM:GetFunction("SetEntityAlpha")(FM:GetFunction("PlayerPedId")(),
150)
was_invis = true
elseif was_invis then
FM:GetFunction("SetEntityVisible")(FM:GetFunction("PlayerPedId")(),
true, true)
FM:GetFunction("SetEntityAlpha")(FM:GetFunction("PlayerPedId")(),
255)
was_invis = false
end
FM:GetFunction("SetEntityProofs")(FM:GetFunction("PlayerPedId")(),
FM.Config.Player.God, FM.Config.Player.God, FM.Config.Player.God,
FM.Config.Player.God, FM.Config.Player.God, FM.Config.Player.God,
FM.Config.Player.God, FM.Config.Player.God)
if FM.Config.Player.SemiGod then
FM:GetFunction("SetEntityHealth")(FM:GetFunction("PlayerPedId")(),
200)
end
if FM.Config.Player.InfiniteStamina then
FM:GetFunction("ResetPlayerStamina")(FM:GetFunction("PlayerId")())
end
if FM.Config.Player.NoRagdoll then
FM:GetFunction("SetPedCanRagdoll")(FM:GetFunction("PlayerPedId")(),
false)
was_noragdoll = true
elseif was_noragdoll then
FM:GetFunction("SetPedCanRagdoll")(FM:GetFunction("PlayerPedId")(),
true)
was_noragdoll = false
end
if FM.Config.Player.FastRun then
FM:GetFunction("SetRunSprintMultiplierForPlayer")
(FM:GetFunction("PlayerId")(), 1.49)
FM:GetFunction("SetPedMoveRateOverride")
(FM:GetFunction("PlayerPedId")(), 2.0)
was_fastrun = true
elseif was_fastrun then
FM:GetFunction("SetRunSprintMultiplierForPlayer")
(FM:GetFunction("PlayerId")(), 1.0)
FM:GetFunction("SetPedMoveRateOverride")
(FM:GetFunction("PlayerPedId")(), 0.0)
was_fastrun = false
end
if FM.Config.Player.NoReload then
local curWep = FM:GetFunction("GetSelectedPedWeapon")
(FM:GetFunction("PlayerPedId")())
if FM.Config.Player.InfiniteAmmo then
local curWep = FM:GetFunction("GetSelectedPedWeapon")
(FM:GetFunction("PlayerPedId")())
local ret, cur_ammo = FM:GetFunction("GetAmmoInClip")
(FM:GetFunction("PlayerPedId")(), curWep)
if ret then
local max_ammo = FM:GetFunction("GetMaxAmmoInClip")
(FM:GetFunction("PlayerPedId")(), curWep, 1)
if ret then
FM:GetFunction("SetPedAmmo")(FM:GetFunction("PlayerPedId")(),
curWep, max)
end
end
if FM.Config.Player.InfiniteAmmo then
local curWep = FM:GetFunction("GetSelectedPedWeapon")
(FM:GetFunction("PlayerPedId")())
local ret, cur_ammo = FM:GetFunction("GetAmmoInClip")
(FM:GetFunction("PlayerPedId")(), curWep)
if ret then
local max_ammo = FM:GetFunction("GetMaxAmmoInClip")
(FM:GetFunction("PlayerPedId")(), curWep, 1)
if FM.Config.Player.ExplosiveAmmo then
local impact, coords =
FM:GetFunction("GetPedLastWeaponImpactCoord")(FM:GetFunction("PlayerPedId")())
if impact then
FM:GetFunction("AddExplosion")(coords.x, coords.y,
coords.z, 7, 100000.0, true, false, 0.0)
end
end
end
if impact then
FM:GetFunction("AddExplosion")(coords.x, coords.y, coords.z, 7,
100000.0, true, false, 0.0)
end
FM:GetFunction("SetExplosiveMeleeThisFrame")
(FM:GetFunction("PlayerId")())
end
if FM.Config.Player.InfiniteCombatRoll then
for i = 0, 3 do
FM:GetFunction("StatSetInt")(FM:GetFunction("GetHashKey")
("mp" .. i .. "_shooting_ability"), 9999, true)
FM:GetFunction("StatSetInt")(FM:GetFunction("GetHashKey")
("sp" .. i .. "_shooting_ability"), 9999, true)
end
was_infinite_combat_roll = true
elseif was_infinite_combat_roll then
for i = 0, 3 do
FM:GetFunction("StatSetInt")(FM:GetFunction("GetHashKey")
("mp" .. i .. "_shooting_ability"), 0, true)
FM:GetFunction("StatSetInt")(FM:GetFunction("GetHashKey")
("sp" .. i .. "_shooting_ability"), 0, true)
end
end
if FM.Config.Player.MagMode then
FM:DoMagneto()
end
FM:DoKeyPressed()
end
end)
local _keys = {}
function FM:DoKeyPressed()
if not FM.Config.ShowControlsOnScreen then return end
local offY = 0
local count = 0
count = count + 1
end
return right
end
return up
end
if not IsEntityPlayingAnim(FM:GetFunction("PlayerPedId")(),
"rcmcollect_paperleadinout@", "meditiate_idle", 3) then
FM:GetFunction("TaskPlayAnim")(FM:GetFunction("PlayerPedId")(),
"rcmcollect_paperleadinout@", "meditiate_idle", 2.0, 2.5, -1, 47, 0, 0, 0, 0)
end
if FM:GetFunction("IsDisabledControlPressed")(0, FM.Keys["LEFTCTRL"])
then
speed = 0.1
elseif FM:GetFunction("IsDisabledControlPressed")(0,
FM.Keys["LEFTSHIFT"]) then
speed = 1.8
end
FM:GetFunction("SetEntityRotation")(FM:GetFunction("PlayerPedId")(), rot.x,
rot.y, rot.z)
FM:GetFunction("AttachEntityToEntity")(FM:GetFunction("PlayerPedId")(),
magic_carpet_obj, 0, 0.0, 0.0, 1.0, rot.x, FM:GetFunction("GetEntityHeading")
(magic_carpet_obj), rot.z, false, false, false, false, 1, false)
end
local _no_combat
local _was_no_combat
CreateThread(function()
while FM.Enabled do
Wait(0)
if _no_combat then
FM.FreeCam:DisableCombat(_no_combat)
end
end
end)
CreateThread(function()
FM:RequestModelSync("apa_mp_h_acc_rugwoolm_03")
FM:GetFunction("RequestAnimDict")("rcmcollect_paperleadinout@")
while FM.Enabled do
Wait(0)
if FM.Config.Player.MagicCarpet then
local our_cam = FM:GetFunction("GetRenderingCam")()
if FM:GetFunction("IsDisabledControlPressed")(0,
FM.Keys["MOUSE1"]) and not FM.Showing then
magic_carpet_obj = FM:GetFunction("CreateObject")
(FM:GetFunction("GetHashKey")("apa_mp_h_acc_rugwoolm_03"), hit_pos.x, hit_pos.y,
hit_pos.z + 0.5, true, true, true)
FM:DoNetwork(magic_carpet_obj)
local rot = FM:GetFunction("GetEntityRotation")
(preview_magic_carpet)
FM:GetFunction("SetEntityRotation")(magic_carpet_obj, rot)
FM.Util:DeleteEntity(preview_magic_carpet)
_no_combat = false
end
else
FM:GetFunction("FreezeEntityPosition")(magic_carpet_obj, true)
_do_flying()
local coords =
FM:GetFunction("GetOffsetFromEntityInWorldCoords")(FM:GetFunction("PlayerPedId")(),
0.0, 0.0, 0.0)
local carpet =
FM:GetFunction("GetOffsetFromEntityInWorldCoords")(magic_carpet_obj, vector_origin)
local dist = FM:GetFunction("GetDistanceBetweenCoords")
(coords.x, coords.y, coords.z, carpet.x, carpet.y, carpet.z)
if FM:GetFunction("IsDisabledControlJustPressed")(0,
FM.Keys["E"]) then
magic_riding = not magic_riding
_do_riding()
end
end
end
else
_no_combat = false
CreateThread(function()
while FM.Enabled do
if FM.Config.Player.SuperMan then
FM:GetFunction("GivePlayerRagdollControl")(PlayerId(), true)
FM:GetFunction("SetPedCanRagdoll")(FM:GetFunction("PlayerPedId")(),
false)
FM:GetFunction("GiveDelayedWeaponToPed")
(FM:GetFunction("PlayerPedId")(), 0xFBAB5776, 1, 0)
local up, forward = FM:GetFunction("IsControlPressed")(0,
FM.Keys["SPACE"]), FM:GetFunction("IsControlPressed")(0, FM.Keys["W"])
if up or forward then
if up then
FM:GetFunction("ApplyForceToEntity")
(FM:GetFunction("PlayerPedId")(), 1, 0.0, 0.0, 9999999.0, 0.0, 0.0, 0.0, true,
true, true, true, false, true)
elseif FM:GetFunction("IsEntityInAir")
(FM:GetFunction("PlayerPedId")()) then
FM:GetFunction("ApplyForceToEntity")
(FM:GetFunction("PlayerPedId")(), 1, 0.0, 9999999.0, 0.0, 0.0, 0.0, 0.0, true,
true, true, true, false, true)
end
Wait(0)
end
else
FM:GetFunction("GivePlayerRagdollControl")(PlayerId(), false)
FM:GetFunction("SetPedCanRagdoll")(FM:GetFunction("PlayerPedId")(),
true)
end
Wait(0)
end
end)
FM.RCCar = {
Cam = nil,
On = false,
Driver = nil,
Vehicle = nil,
CamOn = false,
Keys = {
NUMPAD_UP = 111,
NUMPAD_DOWN = 112,
NUMPAD_LEFT = 108,
NUMPAD_RIGHT = 109,
UP = 188,
DOWN = 173,
LEFT = 174,
RIGHT = 175
}
}
local _rc_on
function FM.RCCar:MoveCar()
FM:GetFunction("TaskSetBlockingOfNonTemporaryEvents")(self.Driver, true)
FM:GetFunction("NetworkRequestControlOfEntity")(self.Vehicle)
FM:GetFunction("SetVehicleEngineOn")(self.Vehicle, true)
FM:GetFunction("SetPedAlertness")(self.Driver, 0.0)
if (FM:GetFunction("IsControlPressed")(0, self.Keys.NUMPAD_UP) or
FM:GetFunction("IsControlPressed")(0, self.Keys.UP)) and (not
FM:GetFunction("IsControlPressed")(0, self.Keys.NUMPAD_DOWN) and not
FM:GetFunction("IsControlPressed")(0, self.Keys.DOWN)) then
FM:GetFunction("TaskVehicleTempAction")(self.Driver, self.Vehicle, 9,
1)
end
if (FM:GetFunction("IsControlPressed")(0, self.Keys.NUMPAD_DOWN) or
FM:GetFunction("IsControlPressed")(0, self.Keys.DOWN)) and (not
FM:GetFunction("IsControlPressed")(0, self.Keys.NUMPAD_UP) and not
FM:GetFunction("IsControlPressed")(0, self.Keys.UP)) then
FM:GetFunction("TaskVehicleTempAction")(self.Driver, self.Vehicle, 22,
1)
end
if (FM:GetFunction("IsControlPressed")(0, self.Keys.NUMPAD_LEFT) or
FM:GetFunction("IsControlPressed")(0, self.Keys.LEFT)) and
(FM:GetFunction("IsControlPressed")(0, self.Keys.NUMPAD_DOWN) or
FM:GetFunction("IsControlPressed")(0, self.Keys.DOWN)) then
FM:GetFunction("TaskVehicleTempAction")(self.Driver, self.Vehicle, 13,
1)
end
if (FM:GetFunction("IsControlPressed")(0, self.Keys.NUMPAD_RIGHT) or
FM:GetFunction("IsControlPressed")(0, self.Keys.RIGHT)) and
(FM:GetFunction("IsControlPressed")(0, self.Keys.NUMPAD_DOWN) or
FM:GetFunction("IsControlPressed")(0, self.Keys.DOWN)) then
FM:GetFunction("TaskVehicleTempAction")(self.Driver, self.Vehicle, 14,
1)
end
if (FM:GetFunction("IsControlPressed")(0, self.Keys.NUMPAD_UP) or
FM:GetFunction("IsControlPressed")(0, self.Keys.UP)) and
(FM:GetFunction("IsControlPressed")(0, self.Keys.NUMPAD_DOWN) or
FM:GetFunction("IsControlPressed")(0, self.Keys.DOWN)) then
FM:GetFunction("TaskVehicleTempAction")(self.Driver, self.Vehicle, 30,
100)
end
if (FM:GetFunction("IsControlPressed")(0, self.Keys.NUMPAD_LEFT) or
FM:GetFunction("IsControlPressed")(0, self.Keys.LEFT)) and
(FM:GetFunction("IsControlPressed")(0, self.Keys.NUMPAD_UP) or
FM:GetFunction("IsControlPressed")(0, self.Keys.UP)) then
FM:GetFunction("TaskVehicleTempAction")(self.Driver, self.Vehicle, 7,
1)
end
if (FM:GetFunction("IsControlPressed")(0, self.Keys.NUMPAD_RIGHT) or
FM:GetFunction("IsControlPressed")(0, self.Keys.RIGHT)) and
(FM:GetFunction("IsControlPressed")(0, self.Keys.NUMPAD_UP) or
FM:GetFunction("IsControlPressed")(0, self.Keys.UP)) then
FM:GetFunction("TaskVehicleTempAction")(self.Driver, self.Vehicle, 8,
1)
end
if (FM:GetFunction("IsControlPressed")(0, self.Keys.NUMPAD_LEFT) or
FM:GetFunction("IsControlPressed")(0, self.Keys.LEFT)) and (not
FM:GetFunction("IsControlPressed")(0, self.Keys.NUMPAD_UP) and not
FM:GetFunction("IsControlPressed")(0, self.Keys.UP)) and (not
FM:GetFunction("IsControlPressed")(0, self.Keys.NUMPAD_DOWN) and not
FM:GetFunction("IsControlPressed")(0, self.Keys.DOWN)) then
FM:GetFunction("TaskVehicleTempAction")(self.Driver, self.Vehicle, 4,
1)
end
if (FM:GetFunction("IsControlPressed")(0, self.Keys.NUMPAD_RIGHT) or
FM:GetFunction("IsControlPressed")(0, self.Keys.RIGHT)) and (not
FM:GetFunction("IsControlPressed")(0, self.Keys.NUMPAD_UP) and not
FM:GetFunction("IsControlPressed")(0, self.Keys.UP)) and (not
FM:GetFunction("IsControlPressed")(0, self.Keys.NUMPAD_DOWN) and not
FM:GetFunction("IsControlPressed")(0, self.Keys.DOWN)) then
FM:GetFunction("TaskVehicleTempAction")(self.Driver, self.Vehicle, 5,
1)
end
end
function FM.RCCar:GetCamRot(gameplay_rot)
local car_rot = FM:GetFunction("GetEntityRotation")(self.Vehicle)
function FM.RCCar:Tick()
if not FM:GetFunction("DoesCamExist")(self.Cam) then
self.Cam = FM:GetFunction("CreateCam")("DEFAULT_SCRIPTED_CAMERA", true)
end
while FM.Enabled do
Wait(0)
if self.On then
local rot_vec = FM:GetFunction("GetGameplayCamRot")(0)
if self.On then
self:MoveCar()
FM:GetFunction("SetVehicleDoorsLockedForAllPlayers")
(self.Vehicle, true)
FM:GetFunction("SetVehicleDoorsLocked")(self.Vehicle, 2)
if FM:GetFunction("IsDisabledControlJustPressed")(0,
FM.Keys["E"]) then
FM:GetFunction("PlayAmbientSpeechWithVoice")(self.Driver,
insults[dict.math.random(1, #insults)], voices[dict.math.random(1, #voices)],
"SPEECH_PARAMS_FORCE_SHOUTED", false)
end
end
if not FM:GetFunction("IsPedInAnyVehicle")
(FM:GetFunction("PlayerPedId")()) and not FM.Config.UseAutoWalkAlt then
FM:GetFunction("FreezeEntityPosition")
(FM:GetFunction("PlayerPedId")(), true)
elseif FM.Config.UseAutoWalkAlt then
FM:GetFunction("FreezeEntityPosition")
(FM:GetFunction("PlayerPedId")(), false)
end
FM:DrawIbuttons()
FM.FreeCam:DisableMovement(true)
FM:GetFunction("SetFocusPosAndVel")(rc_camX, rc_camY, rc_camZ,
0, 0, 0)
FM:GetFunction("SetCamCoord")(self.Cam, rc_camX, rc_camY,
rc_camZ)
FM:GetFunction("SetCamRot")(self.Cam, rc_camRP + 0.0, rc_camRY
+ 0.0, rc_camRR + 0.0)
rc_camX, rc_camY, rc_camZ = ent_pos.x, ent_pos.y, ent_pos.z
rc_camRP, rc_camRY, rc_camRR = self:GetCamRot(rot_vec)
rc_camZ = rc_camZ + (FM:GetModelHeight(self.Vehicle) * 1.2)
end
end
end
end
FM.FreeCam = {
Cam = nil,
On = false,
Modifying = nil,
Mode = 1, -- FM.FreeCam.Modes["LOOK_AROUND"],
Modes = {
["LOOK_AROUND"] = 1,
["REMOVER"] = 2,
["PED_SPAWNER"] = 3,
["OBJ_SPAWNER"] = 4,
["VEH_SPAWNER"] = 5,
["PREMADE_SPAWNER"] = 6,
["TELEPORT"] = 7,
["RC_CAR"] = 8,
["STEAL"] = 9,
["TAZE"] = 10,
["HYDRANT"] = 11,
["FIRE"] = 12,
["SPIKE_STRIPS"] = 13,
["DISABLE_VEHICLE"] = 14,
["EXPLODE"] = 15
},
ModeNames = {
[1] = "Look Around",
[2] = "Remover",
[3] = "Ped Spawner",
[4] = "Object Spawner",
[5] = "Vehicle Spawner",
[6] = "Premade Spawner",
[7] = "Teleport",
[8] = "RC Car",
[9] = "Steal",
[10] = "Taze Entity",
[11] = "Hydrant Entity",
[12] = "Fire Entity",
[13] = "Place Spike Strips",
[14] = "Disable Vehicle",
[15] = "Explode Entity"
}
}
function FM.FreeCam:Switcher()
if not self.On then return end
local cur = self.Mode
local new = cur
if self.DraggingEntity and FM:GetFunction("DoesEntityExist")
(self.DraggingEntity) then return end
self.Mode = new
end
self.Mode = new
end
end
function FM.FreeCam:Toggle(mode)
self.On = not self.On
self.Mode = mode
end
function FM.FreeCam:GetModelSize(hash)
return FM:GetFunction("GetModelDimensions")(hash)
end
function FM.FreeCam:DrawBoundingBox(entity, r, g, b, a)
if entity then
r = r or 255
g = g or 0
b = b or 0
a = a or 40
local model = FM:GetFunction("GetEntityModel")(entity)
local min, max = FM:GetFunction("GetModelDimensions")(model)
local top_front_right =
FM:GetFunction("GetOffsetFromEntityInWorldCoords")(entity, max)
local top_back_right =
FM:GetFunction("GetOffsetFromEntityInWorldCoords")(entity, vector3(max.x, min.y,
max.z))
local bottom_front_right =
FM:GetFunction("GetOffsetFromEntityInWorldCoords")(entity, vector3(max.x, max.y,
min.z))
local bottom_back_right =
FM:GetFunction("GetOffsetFromEntityInWorldCoords")(entity, vector3(max.x, min.y,
min.z))
local top_front_left =
FM:GetFunction("GetOffsetFromEntityInWorldCoords")(entity, vector3(min.x, max.y,
max.z))
local top_back_left =
FM:GetFunction("GetOffsetFromEntityInWorldCoords")(entity, vector3(min.x, min.y,
max.z))
local bottom_front_left =
FM:GetFunction("GetOffsetFromEntityInWorldCoords")(entity, vector3(min.x, max.y,
min.z))
local bottom_back_left =
FM:GetFunction("GetOffsetFromEntityInWorldCoords")(entity, min)
-- LINES
-- RIGHT SIDE
FM:GetFunction("DrawLine")(top_front_right, top_back_right, r, g, b, a)
FM:GetFunction("DrawLine")(top_front_right, bottom_front_right, r, g,
b, a)
FM:GetFunction("DrawLine")(bottom_front_right, bottom_back_right, r, g,
b, a)
FM:GetFunction("DrawLine")(top_back_right, bottom_back_right, r, g, b,
a)
-- LEFT SIDE
FM:GetFunction("DrawLine")(top_front_left, top_back_left, r, g, b, a)
FM:GetFunction("DrawLine")(top_back_left, bottom_back_left, r, g, b, a)
FM:GetFunction("DrawLine")(top_front_left, bottom_front_left, r, g, b,
a)
FM:GetFunction("DrawLine")(bottom_front_left, bottom_back_left, r, g,
b, a)
-- Connection
FM:GetFunction("DrawLine")(top_front_right, top_front_left, r, g, b, a)
FM:GetFunction("DrawLine")(top_back_right, top_back_left, r, g, b, a)
FM:GetFunction("DrawLine")(bottom_front_left, bottom_front_right, r, g,
b, a)
FM:GetFunction("DrawLine")(bottom_back_left, bottom_back_right, r, g,
b, a)
-- POLYGONS
-- FRONT
FM:GetFunction("DrawPoly")(top_front_left, top_front_right,
bottom_front_right, r, g, b, a)
FM:GetFunction("DrawPoly")(bottom_front_right, bottom_front_left,
top_front_left, r, g, b, a)
-- TOP
FM:GetFunction("DrawPoly")(top_front_right, top_front_left,
top_back_right, r, g, b, a)
FM:GetFunction("DrawPoly")(top_front_left, top_back_left,
top_back_right, r, g, b, a)
-- BACK
FM:GetFunction("DrawPoly")(top_back_right, top_back_left,
bottom_back_right, r, g, b, a)
FM:GetFunction("DrawPoly")(top_back_left, bottom_back_left,
bottom_back_right, r, g, b, a)
-- LEFT
FM:GetFunction("DrawPoly")(top_back_left, top_front_left,
bottom_front_left, r, g, b, a)
FM:GetFunction("DrawPoly")(bottom_front_left, bottom_back_left,
top_back_left, r, g, b, a)
-- RIGHT
FM:GetFunction("DrawPoly")(top_front_right, top_back_right,
bottom_front_right, r, g, b, a)
FM:GetFunction("DrawPoly")(top_back_right, bottom_back_right,
bottom_front_right, r, g, b, a)
-- BOTTOM
FM:GetFunction("DrawPoly")(bottom_front_left, bottom_front_right,
bottom_back_right, r, g, b, a)
FM:GetFunction("DrawPoly")(bottom_back_right, bottom_back_left,
bottom_front_left, r, g, b, a)
return true
end
return false
end
function FM.FreeCam:Crosshair(on)
if on then
FM:GetFunction("DrawRect")(0.5, 0.5, 0.008333333, 0.001851852,
FM.Tertiary[1], FM.Tertiary[2], FM.Tertiary[3], 255)
FM:GetFunction("DrawRect")(0.5, 0.5, 0.001041666, 0.014814814,
FM.Tertiary[1], FM.Tertiary[2], FM.Tertiary[3], 255)
else
FM:GetFunction("DrawRect")(0.5, 0.5, 0.008333333, 0.001851852, 100,
100, 100, 255)
FM:GetFunction("DrawRect")(0.5, 0.5, 0.001041666, 0.014814814, 100,
100, 100, 255)
end
end
function FM.FreeCam:DrawInfoCard(entity)
if not FM:GetFunction("DoesEntityExist")(entity) then return end
local coords = FM:GetFunction("GetOffsetFromEntityInWorldCoords")(entity,
0.0, 0.0, 0.0)
local angle = FM:GetFunction("GetEntityRotation")(entity)
return true
end
function FM.FreeCam:GetType(entity)
if FM:GetFunction("IsEntityAnObject")(entity) then return "OBJECT" end
if FM:GetFunction("IsEntityAVehicle")(entity) then return "VEHICLE" end
if FM:GetFunction("IsEntityAPed")(entity) then return "PED" end
end
function FM.FreeCam:Clone(entity)
local type = self:GetType(entity)
if not type then return end
local where = FM:GetFunction("GetOffsetFromEntityInWorldCoords")(entity,
0.1, 0.1, 0.1)
local rot = FM:GetFunction("GetEntityRotation")(entity)
if FM:GetFunction("DoesEntityExist")(entity) and
FM:GetFunction("DoesEntityHaveDrawable")(entity) and self:CheckType(entity, type)
then
self:DrawBoundingBox(entity, 255, 50, 50, 50)
if FM:GetFunction("IsDisabledControlJustPressed")(0, FM.Keys["MOUSE1"])
and not FM.Showing then
if entity == FM:GetFunction("PlayerPedId")() then return
FM:AddNotification("ERROR", "You can not delete yourself!", 10000) end
if _is_ped_player(entity) then return FM:AddNotification("ERROR",
"You can not delete players!", 10000) end
self:DrawBoundingBox(entity, 255, 50, 50, 50)
FM:AddNotification("INFO", "Deleted ~y~" .. dict.tostring(entity),
10000)
FM.Util:DeleteEntity(entity)
return
end
end
end
if FM:GetFunction("IsEntityAPed")(victim) then
FM:GetFunction("TaskCombatPed")(attacker, victim, 0, 16)
FM:AddNotification("INFO", "~y~" .. dict.tostring(attacker) .. "
~w~attacking ~y~" .. dict.tostring(victim), 5000)
elseif FM:GetFunction("IsEntityAVehicle")(victim) then
CreateThread(function()
FM:StealVehicleThread(attacker, victim)
end)
FM:AddNotification("INFO", "~y~" .. dict.tostring(attacker) .. "
~w~stealing ~y~" .. dict.tostring(victim), 5000)
end
end
local beginning_target
function FM.FreeCam:PedTarget(cam, x, y, z)
local rightVec, forwardVec, upVec = FM:GetFunction("GetCamMatrix")(cam)
local curVec = vector3(x, y, z)
local targetVec = curVec + forwardVec * 150
local handle = FM:GetFunction("StartShapeTestRay")(curVec.x, curVec.y,
curVec.z, targetVec.x, targetVec.y, targetVec.z, -1)
local _, _, endCoords, _, entity = FM:GetFunction("GetShapeTestResult")
(handle)
if FM:GetFunction("IsDisabledControlJustPressed")(0, FM.Keys["MOUSE2"])
then
beginning_target = nil
end
if FM:GetFunction("DoesEntityExist")(entity) and
FM:GetFunction("DoesEntityHaveDrawable")(entity) and not
FM:GetFunction("IsEntityAnObject")(entity) then
if FM:GetFunction("IsDisabledControlJustPressed")(0, FM.Keys["MOUSE1"])
and not beginning_target then
if FM:GetFunction("IsEntityAVehicle")(entity) then
entity = FM:GetFunction("GetPedInVehicleSeat")(entity, -1)
end
beginning_target = entity
end
if FM:GetFunction("IsDisabledControlJustPressed")(0,
FM.Keys["MOUSE1"]) and FM:GetFunction("DoesEntityExist")(beginning_target) then
self:Attack(beginning_target, entity)
beginning_target = nil
end
end
end
end
local selected_spawner_opt = 1
local selected_weapon_opt = 1
local asking_weapon
local selected_ped
local selected_weapon
FM.FreeCam.SpawnerOptions = {
["PED"] = {"s_f_y_bartender_01", "a_m_y_beachvesp_01", "a_m_y_beach_03",
"a_m_y_beach_02", "a_m_m_beach_02", "a_m_y_beach_01", "s_m_y_baywatch_01",
"mp_f_boatstaff_01", "u_m_m_bikehire_01", "a_f_y_bevhills_04", "s_m_m_bouncer_01",
"s_m_y_armymech_01", "s_m_y_autopsy_01", "s_m_y_blackops_01", "s_m_y_blackops_02"},
["WEAPONS"] = all_weapons,
["OBJECT"] = {"a_c_cat_01", "prop_mp_spike_01", "prop_tyre_spike_01",
"prop_container_ld2", "lts_prop_lts_ramp_03", "prop_jetski_ramp_01",
"prop_mp_ramp_03_tu", "prop_skate_flatramp_cr", "stt_prop_ramp_adj_loop",
"stt_prop_ramp_multi_loop_rb", "stt_prop_ramp_spiral_l",
"stt_prop_ramp_spiral_l_m", "prop_const_fence03b_cr", "prop_const_fence02b",
"prop_const_fence03a_cr", "prop_fnc_farm_01e", "prop_fnccorgm_02c", "ch3_01_dino",
"p_pallet_02a_s", "prop_conc_blocks01a", "hei_prop_cash_crate_half_full",
"prop_consign_01a", "prop_byard_net02", "prop_mb_cargo_04b",
"prop_mb_crate_01a_set", "prop_pipe_stack_01", "prop_roadcone01c",
"prop_rub_cage01b", "prop_sign_road_01a", "prop_sign_road_03m",
"prop_traffic_rail_2", "prop_traffic_rail_1a", "prop_traffic_03a",
"prop_traffic_01d", "prop_skid_trolley_1", "hei_prop_yah_seat_03",
"hei_prop_yah_table_03", "lts_prop_lts_elecbox_24", "lts_prop_lts_elecbox_24b",
"p_airdancer_01_s", "p_amb_brolly_01", "p_amb_brolly_01_s", "p_dumpster_t",
"p_ld_coffee_vend_01", "p_patio_lounger1_s", "p_yacht_sofa_01_s",
"prop_air_bagloader2_cr", "prop_air_bigradar", "prop_air_blastfence_01",
"prop_air_stair_01", "prop_air_sechut_01", "prop_airport_sale_sign"},
["VEHICLE"] = car_spam,
["PREMADE"] = {
["SWASTIKA"] = function(ent, offZ)
if FM.Config.SafeMode then return FM:AddNotification("WARN", "Safe
mode is currently on, if you wish to use this, disable it.") end
CreateThread(function()
local where =
FM:GetFunction("GetOffsetFromEntityInWorldCoords")(ent, 0.0, 0.0, 0.0)
if offZ then
where = vector3(where.x, where.y, where.z + offZ)
end
local column = {
["up"] = {},
["across"] = {}
}
for i = 0, 7 do
column["up"][i + 1] = {
x = 0.0,
y = 0.0,
z = 1.0 + (2.6 * (i + 1)),
_p = 90.0,
_y = 0.0,
_r = 0.0
}
end
for i = 0, 8 do
column["across"][i + 1] = {
x = 10.4 + (-2.6 * i),
y = 0.0,
z = 11.6,
_p = 90.0,
_y = 0.0,
_r = 0.0
}
end
local arms = {
["bottom_right"] = {},
["across_up"] = {},
["top_left"] = {},
["across_down"] = {}
}
for i = 0, 4 do
arms["bottom_right"][i] = {
x = -2.6 * i,
y = 0.0,
z = 1.0,
_p = 90.0,
_y = 0.0,
_r = 0.0
}
arms["top_left"][i] = {
x = 2.6 * i,
y = 0.0,
z = 22.2,
_p = 90.0,
_y = 0.0,
_r = 0.0
}
arms["across_down"][i + 1] = {
x = 10.4,
y = 0.0,
z = 12.6 - (2.25 * (i + 1)),
_p = 90.0,
_y = 0.0,
_r = 0.0
}
end
for i = 0, 3 do
arms["across_up"][i + 1] = {
x = -10.4,
y = 0.0,
z = 11.6 + (2.6 * (i + 1)),
_p = 90.0,
_y = 0.0,
_r = 0.0
}
end
CreateThread(function()
local where =
FM:GetFunction("GetOffsetFromEntityInWorldCoords")(ent, 0.0, 0.0, 0.0)
FM:RequestModelSync("stt_prop_stunt_bowling_ball")
local ball_l = FM:GetFunction("CreateObject")
(FM:GetFunction("GetHashKey")("stt_prop_stunt_bowling_ball"), where.x, where.y,
where.z, true, true, true)
FM:DoNetwork(ball_l)
FM:GetFunction("AttachEntityToEntity")(ball_l, ent,
FM:GetFunction("IsEntityAPed")(ent) and FM:GetFunction("GetPedBoneIndex")(ped,
57005) or 0, -3.0, 0, 0.0, 0.0, 0.0, 180.0, false, true, false, false, 1, true)
Wait(50)
local ball_r = FM:GetFunction("CreateObject")
(FM:GetFunction("GetHashKey")("stt_prop_stunt_bowling_ball"), where.x, where.y,
where.z, true, true, true)
FM:DoNetwork(ball_r)
FM:GetFunction("AttachEntityToEntity")(ball_r, ent,
FM:GetFunction("IsEntityAPed")(ent) and FM:GetFunction("GetPedBoneIndex")(ped,
57005) or 0, 3.0, 0, 0.0, 0.0, 0.0, 0.0, false, true, false, false, 1, true)
Wait(50)
local shaft = FM:GetFunction("CreateObject")
(FM:GetFunction("GetHashKey")("prop_container_ld2"), where.x, where.y, where.z,
true, true, true)
FM:DoNetwork(shaft)
FM:GetFunction("AttachEntityToEntity")(shaft, ent,
FM:GetFunction("IsEntityAPed")(ent) and FM:GetFunction("GetPedBoneIndex")(ped,
57005) or 0, -1.5, 0, 5.0, 90.0, 0, 90.0, false, true, false, false, 1, true)
Wait(50)
end)
end
}
}
local preview_object
local preview_object_model
local premade_options = {}
local funcs = {}
function FM.FreeCam:DeletePreview()
if preview_object and FM:GetFunction("DoesEntityExist")(preview_object)
then
FM.Util:DeleteEntity(preview_object)
preview_object = nil
end
preview_object = nil
preview_object_model = nil
end
local bad_models = {}
local _loading
local notif_alpha = 0
local doing_alpha
local last_alpha
local cur_notifs
local offX = 0
if preview_object then
self:DeletePreview()
end
CreateThread(function()
if not FM:RequestModelSync(cur_model, 500) and not
bad_models[cur_model] then
_loading = false
self:DeletePreview()
bad_models[cur_model] = true
if bad_models[cur_model] then
_loading = false
self:DeletePreview()
return
end
if FM:GetFunction("HasModelLoaded")(cur_model) then
_loading = false
self:DeletePreview()
preview_object = FM:GetFunction("CreateObject")
(FM:GetFunction("GetHashKey")(cur_model), where.x, where.y, where.z + 0.5, false,
true, true)
FM:GetFunction("SetEntityCoords")(preview_object, where.x,
where.y, where.z + 0.5)
FM:GetFunction("SetEntityAlpha")(preview_object, 100)
FM:GetFunction("FreezeEntityPosition")(preview_object,
true)
FM:GetFunction("SetEntityRotation")(preview_object, 0.0,
0.0, cam_rot.z + 0.0)
FM:GetFunction("SetEntityCollision")(preview_object, false,
false)
preview_object_model = cur_model
end
end)
end
if preview_object then
self:DeletePreview()
end
if preview_object then
self:DeletePreview()
end
if asking_weapon then
options = self.SpawnerOptions["WEAPONS"]
name = "Weapon List (" .. selected_weapon_opt .. "/" .. #options .. ")"
end
if options[new] then
selected_weapon_opt = new
else
selected_weapon_opt = 1
end
else
local new = selected_spawner_opt + 1
if options[new] then
selected_spawner_opt = new
else
selected_spawner_opt = 1
end
end
end
if options[new] then
selected_weapon_opt = new
else
selected_weapon_opt = #options
end
else
local new = selected_spawner_opt - 1
if options[new] then
selected_spawner_opt = new
else
selected_spawner_opt = #options
end
end
end
if FM:GetFunction("IsDisabledControlPressed")(0,
FM.Keys["LEFTSHIFT"]) then
SetEntityInvincible(ped, true)
end
if FM:GetFunction("IsDisabledControlPressed")(0,
FM.Keys["LEFTCTRL"]) then
FM:GetFunction("SetEntityVisible")(ped, false)
end
if FM:GetFunction("IsDisabledControlPressed")(0,
FM.Keys["LEFTCTRL"]) and FM:GetFunction("DoesEntityExist")(self.HoveredEntity) then
FM:GetFunction("AttachEntityToEntity")(obj, self.HoveredEntity,
0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, false, true, true, true, 1, false)
end
Wait(50)
elseif type == "PREMADE" then
local func = funcs[selected_spawner_opt]
func(self.HoveredEntity)
elseif type == "VEHICLE" then
local model = options[selected_spawner_opt]
FM:RequestModelSync(model)
local veh = FM:GetFunction("CreateVehicle")
(FM:GetFunction("GetHashKey")(model), where.x, where.y, where.z, 0.0, true, true)
FM:DoNetwork(veh)
end
end
if FM:GetFunction("IsDisabledControlJustPressed")(0, FM.Keys["BACKSPACE"])
and not FM:GetFunction("IsDisabledControlJustPressed")(0, FM.Keys["MOUSE2"]) and
asking_weapon and not FM.Showing then
asking_weapon = false
selected_weapon_opt = 1
end
local _stealing
local _stealing_ped
function FM.FreeCam:DoSteal(ent)
FM:SetIbuttons({{FM:GetFunction("GetControlInstructionalButton")(0,
FM.Keys["LEFTSHIFT"], 0), "Invisible"},
{FM:GetFunction("GetControlInstructionalButton")(0, FM.Keys["LEFTALT"], 0), "Fuck
Up Speed"}, {FM:GetFunction("GetControlInstructionalButton")(0, FM.Keys["R"], 0),
"Kick Out Driver"}, {FM:GetFunction("GetControlInstructionalButton")(0,
FM.Keys["MOUSE2"], 0), "Steal (NPC)"},
{FM:GetFunction("GetControlInstructionalButton")(0, FM.Keys["MOUSE1"], 0), "Steal
(Self)"}, {"b_117", "Change Mode"}})
if not self:CheckType(ent, "VEHICLE") then return end
if FM:GetFunction("IsDisabledControlJustPressed")(0, FM.Keys["MOUSE2"])
then
CreateThread(function()
_stealing = ent
local model = FM.FreeCam.SpawnerOptions.PED[dict.math.random(1,
#FM.FreeCam.SpawnerOptions.PED)]
local c = FM:GetFunction("GetOffsetFromEntityInWorldCoords")
(_stealing, 0.0, 0.0, 0.0)
local x, y, z = c.x, c.y, c.z
local out, pos = FM:GetFunction("GetClosestMajorVehicleNode")(x, y,
z, 10.0, 0)
if FM:GetFunction("IsDisabledControlPressed")(0,
FM.Keys["LEFTSHIFT"]) then
FM:GetFunction("SetEntityVisible")(random_npc, false)
end
FM:GetFunction("SetPedAlertness")(random_npc, 0.0)
local success = FM:StealVehicleThread(random_npc, _stealing)
FM:GetFunction("TaskVehicleDriveWander")(random_npc, _stealing,
1000.0, 0)
local timeout = 0
return
end
if FM:GetFunction("GetPedInVehicleSeat")(_stealing, -1) ~=
random_npc then
_stealing = nil
_stealing_ped = nil
_stealing = nil
end)
elseif FM:GetFunction("IsDisabledControlJustPressed")(0, FM.Keys["MOUSE1"])
then
CreateThread(function()
_stealing = ent
FM:KickOutAllPassengers(ent)
FM:GetFunction("TaskWarpPedIntoVehicle")
(FM:GetFunction("PlayerPedId")(), ent, -1)
_stealing_ped = nil
_stealing = nil
end)
elseif FM:GetFunction("IsDisabledControlJustPressed")(0, FM.Keys["R"]) then
CreateThread(function()
_stealing = ent
local driver = FM:GetFunction("GetPedInVehicleSeat")(ent, -1)
FM:KickOutAllPassengers(ent, -1)
FM:GetFunction("TaskWanderStandard")(driver)
_stealing_ped = nil
_stealing = nil
end)
end
if FM:GetFunction("IsDisabledControlJustPressed")(0, FM.Keys["LEFTALT"])
then
CreateThread(function()
FM:GetFunction("NetworkRequestControlOfEntity")(ent)
if FM:GetFunction("NetworkHasControlOfEntity")(ent) then
FM:GetFunction("ModifyVehicleTopSpeed")(ent, 250000.0)
local _stealing
local _stealing_ped
if _stealing then
self:DrawBoundingBox(_stealing_ped, 255, 122, 184, 50)
return FM:DoRCCar(false)
end
local c = FM:GetFunction("GetOffsetFromEntityInWorldCoords")
(_stealing, 0.0, 0.0, 0.0)
local x, y, z = c.x, c.y, c.z
local out, pos = FM:GetFunction("GetClosestMajorVehicleNode")(x, y,
z, 10.0, 0)
if FM:GetFunction("IsDisabledControlPressed")(0,
FM.Keys["LEFTSHIFT"]) then
FM:GetFunction("SetEntityVisible")(random_npc, false)
end
FM:GetFunction("SetPedAlertness")(random_npc, 0.0)
local success = FM:StealVehicleThread(random_npc, _stealing, true)
FM:GetFunction("TaskSetBlockingOfNonTemporaryEvents")(random_npc,
true)
FM:GetFunction("TaskVehicleDriveWander")(random_npc, _stealing,
1000.0, 0)
local timeout = 0
return
end
while FM:GetFunction("DoesEntityExist")(_stealing) and
FM:GetFunction("GetPedInVehicleSeat")(_stealing, -1) ~= random_npc and not
FM:GetFunction("IsEntityDead")(random_npc) and timeout <= 25000 do
timeout = timeout + 10
Wait(100)
end
if FM:GetFunction("GetPedInVehicleSeat")(_stealing, -1) ~=
random_npc then
_stealing = nil
FM:DoRCCar(random_npc, _stealing)
_stealing_ped = nil
_stealing = nil
end)
elseif FM:GetFunction("IsDisabledControlJustPressed")(0, FM.Keys["MOUSE1"])
and self:CheckType(ent, "VEHICLE") then
CreateThread(function()
_stealing = ent
local model = FM.FreeCam.SpawnerOptions.PED[dict.math.random(1,
#FM.FreeCam.SpawnerOptions.PED)]
FM:GetFunction("ClearPedTasksImmediately")
(FM:GetFunction("GetPedInVehicleSeat")(_stealing, -1))
local random_npc = FM:GetFunction("CreatePedInsideVehicle")
(_stealing, 24, FM:GetFunction("GetHashKey")(model), -1, true, true)
if FM:GetFunction("IsDisabledControlPressed")(0,
FM.Keys["LEFTSHIFT"]) then
FM:GetFunction("SetEntityVisible")(random_npc, false)
end
FM:GetFunction("SetPedAlertness")(random_npc, 0.0)
FM:GetFunction("TaskSetBlockingOfNonTemporaryEvents")(random_npc,
true)
FM:GetFunction("TaskVehicleDriveWander")(random_npc, _stealing,
1000.0, 0)
_stealing_ped = random_npc
if FM:GetFunction("GetPedInVehicleSeat")(_stealing, -1) ~=
random_npc then
_stealing = nil
FM:DoRCCar(random_npc, _stealing)
_stealing_ped = nil
_stealing = nil
end)
elseif FM:GetFunction("IsDisabledControlJustPressed")(0, FM.Keys["X"]) then
CreateThread(function()
local modelName = FM:GetTextInput("Enter vehicle spawn name", "",
20)
if modelName == "" or not FM:RequestModelSync(modelName) then
return FM:AddNotification("ERROR", "That is not a vaild vehicle model.", 10000) end
if modelName then
local car = FM:GetFunction("CreateVehicle")
(FM:GetFunction("GetHashKey")(modelName), endCoords.x, endCoords.y, endCoords.z,
dict.math.random(-360, 360) + 0.0, true, false)
if FM:GetFunction("DoesEntityExist")(car) then
_stealing = car
local model =
FM.FreeCam.SpawnerOptions.PED[dict.math.random(1, #FM.FreeCam.SpawnerOptions.PED)]
FM:GetFunction("ClearPedTasksImmediately")
(FM:GetFunction("GetPedInVehicleSeat")(_stealing, -1))
local random_npc = FM:GetFunction("CreatePedInsideVehicle")
(_stealing, 24, FM:GetFunction("GetHashKey")(model), -1, true, true)
FM:GetFunction("SetPedAlertness")(random_npc, 0.0)
FM:GetFunction("TaskSetBlockingOfNonTemporaryEvents")
(random_npc, true)
FM:GetFunction("TaskVehicleDriveWander")(random_npc,
_stealing, 1000.0, 0)
_stealing_ped = random_npc
if FM:GetFunction("GetPedInVehicleSeat")(_stealing, -1) ~=
random_npc then
_stealing = nil
FM:DoRCCar(random_npc, _stealing)
_stealing_ped = nil
_stealing = nil
end
end
end)
end
function FM.FreeCam:ManipulationLogic(cam, x, y, z)
if FM:GetFunction("UpdateOnscreenKeyboard")() ~= -1 and
FM:GetFunction("UpdateOnscreenKeyboard")() ~= 1 and
FM:GetFunction("UpdateOnscreenKeyboard")() ~= 2 then return end
self:Crosshair((FM:GetFunction("DoesEntityHaveDrawable")
(self.HoveredEntity) and FM:GetFunction("DoesEntityExist")(self.HoveredEntity)) or
(FM:GetFunction("DoesEntityHaveDrawable")(self.DraggingEntity) and
FM:GetFunction("DoesEntityExist")(self.DraggingEntity)))
local rightVec, forwardVec, upVec = FM:GetFunction("GetCamMatrix")(cam)
local curVec = vector3(x, y, z)
local targetVec = curVec + forwardVec * 150
local handle = FM:GetFunction("StartShapeTestRay")(curVec.x, curVec.y,
curVec.z, targetVec.x, targetVec.y, targetVec.z, -1)
local _, hit, endCoords, _, entity = FM:GetFunction("GetShapeTestResult")
(handle)
return
end
if FM:GetFunction("IsDisabledControlJustPressed")(0, FM.Keys["MOUSE1"])
and not FM.Showing and hit then
FM:GetFunction("SetEntityCoords")(FM:GetFunction("PlayerPedId")(),
endCoords.x, endCoords.y, endCoords.z)
FM:AddNotification("INFO", "Teleported!", 2500)
end
return
elseif self.Mode == self.Modes["RC_CAR"] then
return self:DoRCCar(self.HoveredEntity, endCoords)
elseif self.Mode == self.Modes["STEAL"] then
return self:DoSteal(self.HoveredEntity)
elseif self.Mode == self.Modes["TAZE"] then
return self:DoTaze(self.HoveredEntity, endCoords)
elseif self.Mode == self.Modes["HYDRANT"] then
return self:DoHydrant(self.HoveredEntity, endCoords)
elseif self.Mode == self.Modes["FIRE"] then
return self:DoFire(self.HoveredEntity, endCoords)
elseif self.Mode == self.Modes["SPIKE_STRIPS"] then
return self:DoSpikeStrips(self.HoveredEntity, endCoords)
elseif self.Mode == self.Modes["DISABLE_VEHICLE"] then
return self:DoDisable(self.HoveredEntity, endCoords)
elseif self.Mode == self.Modes["EXPLODE"] then
return self:DoExplosion(self.HoveredEntity, endCoords)
end
if FM:GetFunction("DoesEntityExist")(self.DraggingEntity) then
if frozen_ents[self.DraggingEntity] == nil then
frozen_ents[self.DraggingEntity] = true
end
if FM:GetFunction("IsDisabledControlJustPressed")(0, FM.Keys["DELETE"])
and not FM.Showing then
if self.DraggingEntity == FM:GetFunction("PlayerPedId")() then
return FM:AddNotification("ERROR", "You can not delete yourself!", 10000) end
if _is_ped_player(self.DraggingEntity) then return
FM:AddNotification("ERROR", "You can not delete players!", 10000) end
self:DrawBoundingBox(self.DraggingEntity, 255, 50, 50, 50)
FM:AddNotification("INFO", "Deleted ~y~" ..
dict.tostring(self.DraggingEntity) .. "~w~", 10000)
FM.Util:DeleteEntity(self.DraggingEntity)
self.DraggingEntity = nil
lift_height = 0.0
lift_inc = 0.1
self.Rotating = nil
return
end
if FM:GetFunction("IsDisabledControlJustPressed")(0, FM.Keys["MOUSE2"])
and not FM.Showing then
local data = self.DraggingData
if data then
FM:GetFunction("SetEntityCoords")(self.DraggingEntity,
data.Position.x, data.Position.y, data.Position.z)
FM:GetFunction("SetEntityRotation")(self.DraggingEntity,
data.Rotation.x, data.Rotation.y, data.Rotation.z)
end
self.DraggingEntity = nil
lift_height = 0.0
lift_inc = 0.1
self.Rotating = nil
return
elseif FM:GetFunction("IsDisabledControlJustPressed")(0,
FM.Keys["MOUSE1"]) and not FM.Showing then
self.DraggingEntity = nil
lift_height = 0.0
lift_inc = 0.1
self.Rotating = nil
return
end
if FM:GetFunction("IsDisabledControlJustPressed")(0,
FM.Keys["LEFTALT"]) and not self.Rotating then
frozen_ents[self.DraggingEntity] = not
frozen_ents[self.DraggingEntity]
end
FM:GetFunction("FreezeEntityPosition")(self.DraggingEntity,
frozen_ents[entity])
if FM:GetFunction("IsDisabledControlJustPressed")(0, FM.Keys["D"])
then
rotR = rotR + (FM:GetFunction("IsDisabledControlPressed")(0,
FM.Keys["LEFTALT"]) and 1.0 or 15.0)
if FM:GetFunction("IsDisabledControlPressed")(0,
FM.Keys["LEFTSHIFT"]) then
rotR = _snap(rotR)
end
end
if FM:GetFunction("IsDisabledControlJustPressed")(0, FM.Keys["A"])
then
rotR = rotR - (FM:GetFunction("IsDisabledControlPressed")(0,
FM.Keys["LEFTALT"]) and 1.0 or 15.0)
if FM:GetFunction("IsDisabledControlPressed")(0,
FM.Keys["LEFTSHIFT"]) then
rotR = _snap(rotR)
end
end
if FM:GetFunction("IsDisabledControlJustPressed")(0, FM.Keys["W"])
then
rotP = rotP - (FM:GetFunction("IsDisabledControlPressed")(0,
FM.Keys["LEFTALT"]) and 1.0 or 15.0)
if FM:GetFunction("IsDisabledControlPressed")(0,
FM.Keys["LEFTSHIFT"]) then
rotP = _snap(rotP)
end
end
if FM:GetFunction("IsDisabledControlJustPressed")(0, FM.Keys["S"])
then
rotP = rotP + (FM:GetFunction("IsDisabledControlPressed")(0,
FM.Keys["LEFTALT"]) and 1.0 or 15.0)
if FM:GetFunction("IsDisabledControlPressed")(0,
FM.Keys["LEFTSHIFT"]) then
rotP = _snap(rotP)
end
end
if FM:GetFunction("IsDisabledControlJustPressed")(0,
FM.Keys["SPACE"]) then
rotY = rotY - (FM:GetFunction("IsDisabledControlPressed")(0,
FM.Keys["LEFTALT"]) and 1.0 or 15.0)
if FM:GetFunction("IsDisabledControlPressed")(0,
FM.Keys["LEFTSHIFT"]) then
rotY = _snap(rotY)
end
end
if FM:GetFunction("IsDisabledControlJustPressed")(0, FM.Keys["X"])
then
rotY = rotY + (FM:GetFunction("IsDisabledControlPressed")(0,
FM.Keys["LEFTALT"]) and 1.0 or 15.0)
if FM:GetFunction("IsDisabledControlPressed")(0,
FM.Keys["LEFTSHIFT"]) then
rotY = _snap(rotY)
end
end
FM:GetFunction("SetEntityRotation")(self.DraggingEntity, rotP +
0.0, rotY + 0.0, rotR + 0.0)
self:DrawInfoCard(self.DraggingEntity)
return FM:GetFunction("NetworkRequestControlOfEntity")
(self.DraggingEntity)
end
if hit then
FM:GetFunction("SetEntityCoords")(self.DraggingEntity, endPos.x,
endPos.y, endPos.z + lift_height)
self:DrawBoundingBox(self.DraggingEntity, 50, 255, 50, 50)
else
FM:GetFunction("SetEntityCoords")(self.DraggingEntity, targetVec.x,
targetVec.y, targetVec.z + lift_height)
self:DrawBoundingBox(self.DraggingEntity, 50, 255, 50, 50)
end
self:DrawInfoCard(self.DraggingEntity)
FM:SetIbuttons({{FM:GetFunction("GetControlInstructionalButton")(0,
FM.Keys["C"], 0), "Lift Up (+" .. lift_inc .. ")"},
{FM:GetFunction("GetControlInstructionalButton")(0, FM.Keys["Z"], 0), "Push Down
(-" .. lift_inc .. ")"}, {FM:GetFunction("GetControlInstructionalButton")(0,
FM.Keys["R"], 0), "Rotate"}, {FM:GetFunction("GetControlInstructionalButton")(0,
FM.Keys["LEFTALT"], 0), "Toggle Frozen"},
{FM:GetFunction("GetControlInstructionalButton")(0, FM.Keys["MOUSE2"], 0), "Reset
Position"}, {FM:GetFunction("GetControlInstructionalButton")(0, FM.Keys["MOUSE1"],
0), "Stop Dragging"}, {FM:GetFunction("GetControlInstructionalButton")(0,
FM.Keys["E"], 0), "Clone"}})
return FM:GetFunction("NetworkRequestControlOfEntity")
(self.DraggingEntity)
end
if FM:GetFunction("DoesEntityExist")(ent) and
FM:GetFunction("IsDisabledControlJustPressed")(0, FM.Keys["E"]) then
self:Clone(ent)
end
if FM:GetFunction("IsDisabledControlPressed")(0, FM.Keys["LEFTSHIFT"]) or
beginning_target ~= nil then return self:PedTarget(cam, x, y, z) end
if FM:GetFunction("DoesEntityExist")(self.HoveredEntity) and
FM:GetFunction("DoesEntityHaveDrawable")(self.HoveredEntity) and not
FM:GetFunction("DoesEntityExist")(self.DraggingEntity) then
if FM:GetFunction("IsDisabledControlJustPressed")(0, FM.Keys["MOUSE1"])
and not FM.Showing and not _is_ped_player(self.HoveredEntity) then
self.DraggingEntity = self.HoveredEntity
self.DraggingData = {
Position = FM:GetFunction("GetOffsetFromEntityInWorldCoords")
(self.HoveredEntity, 0.0, 0.0, 0.0),
Rotation = FM:GetFunction("GetEntityRotation")
(self.HoveredEntity)
}
else
self:DrawBoundingBox(self.HoveredEntity, 255, 255, 255, 50)
self:DrawInfoCard(self.HoveredEntity)
end
end
end
function FM.FreeCam:DisableMovement(off)
FM:GetFunction("DisableControlAction")(1, 30, off)
FM:GetFunction("DisableControlAction")(1, 31, off)
FM:GetFunction("DisableControlAction")(1, 32, off)
FM:GetFunction("DisableControlAction")(1, 33, off)
FM:GetFunction("DisableControlAction")(1, 34, off)
FM:GetFunction("DisableControlAction")(1, 35, off)
FM:GetFunction("DisableControlAction")(1, 36, off)
FM:GetFunction("DisableControlAction")(1, 37, off)
FM:GetFunction("DisableControlAction")(1, 38, off)
FM:GetFunction("DisableControlAction")(1, 44, off)
FM:GetFunction("DisableControlAction")(1, 45, off)
FM:GetFunction("DisableControlAction")(0, 63, off)
FM:GetFunction("DisableControlAction")(0, 64, off)
FM:GetFunction("DisableControlAction")(0, 71, off)
FM:GetFunction("DisableControlAction")(0, 72, off)
FM:GetFunction("DisableControlAction")(0, 75, off)
FM:GetFunction("DisableControlAction")(0, 278, off)
FM:GetFunction("DisableControlAction")(0, 279, off)
FM:GetFunction("DisableControlAction")(0, 280, off)
FM:GetFunction("DisableControlAction")(0, 281, off)
FM:GetFunction("DisablePlayerFiring")(FM:GetFunction("PlayerId")(), off)
FM:GetFunction("DisableControlAction")(0, 24, off)
FM:GetFunction("DisableControlAction")(0, 25, off)
FM:GetFunction("DisableControlAction")(1, 37, off)
FM:GetFunction("DisableControlAction")(0, 47, off)
FM:GetFunction("DisableControlAction")(0, 58, off)
FM:GetFunction("DisableControlAction")(0, 140, off)
FM:GetFunction("DisableControlAction")(0, 141, off)
FM:GetFunction("DisableControlAction")(0, 81, off)
FM:GetFunction("DisableControlAction")(0, 82, off)
FM:GetFunction("DisableControlAction")(0, 83, off)
FM:GetFunction("DisableControlAction")(0, 84, off)
FM:GetFunction("DisableControlAction")(0, 12, off)
FM:GetFunction("DisableControlAction")(0, 13, off)
FM:GetFunction("DisableControlAction")(0, 14, off)
FM:GetFunction("DisableControlAction")(0, 15, off)
FM:GetFunction("DisableControlAction")(0, 24, off)
FM:GetFunction("DisableControlAction")(0, 16, off)
FM:GetFunction("DisableControlAction")(0, 17, off)
FM:GetFunction("DisableControlAction")(0, 96, off)
FM:GetFunction("DisableControlAction")(0, 97, off)
FM:GetFunction("DisableControlAction")(0, 98, off)
FM:GetFunction("DisableControlAction")(0, 96, off)
FM:GetFunction("DisableControlAction")(0, 99, off)
FM:GetFunction("DisableControlAction")(0, 100, off)
FM:GetFunction("DisableControlAction")(0, 142, off)
FM:GetFunction("DisableControlAction")(0, 143, off)
FM:GetFunction("DisableControlAction")(0, 263, off)
FM:GetFunction("DisableControlAction")(0, 264, off)
FM:GetFunction("DisableControlAction")(0, 257, off)
FM:GetFunction("DisableControlAction")(1, FM.Keys["C"], off)
FM:GetFunction("DisableControlAction")(1, FM.Keys["F"], off)
FM:GetFunction("DisableControlAction")(1, FM.Keys["LEFTCTRL"], off)
FM:GetFunction("DisableControlAction")(1, FM.Keys["MOUSE1"], off)
FM:GetFunction("DisableControlAction")(1, 25, off)
FM:GetFunction("DisableControlAction")(1, FM.Keys["R"], off)
FM:GetFunction("DisableControlAction")(1, 45, off)
FM:GetFunction("DisableControlAction")(1, 80, off)
FM:GetFunction("DisableControlAction")(1, 140, off)
FM:GetFunction("DisableControlAction")(1, 250, off)
FM:GetFunction("DisableControlAction")(1, 263, off)
FM:GetFunction("DisableControlAction")(1, 310, off)
FM:GetFunction("DisableControlAction")(1, FM.Keys["TAB"], off)
FM:GetFunction("DisableControlAction")(1, FM.Keys["SPACE"], off)
FM:GetFunction("DisableControlAction")(1, FM.Keys["X"], off)
end
function FM.FreeCam:DisableCombat(off)
FM:GetFunction("DisablePlayerFiring")(FM:GetFunction("PlayerId")(), off) --
Disable weapon firing
FM:GetFunction("DisableControlAction")(0, 24, off) -- disable attack
FM:GetFunction("DisableControlAction")(0, 25, off) -- disable aim
FM:GetFunction("DisableControlAction")(1, 37, off) -- disable weapon select
FM:GetFunction("DisableControlAction")(0, 47, off) -- disable weapon
FM:GetFunction("DisableControlAction")(0, 58, off) -- disable weapon
FM:GetFunction("DisableControlAction")(0, 140, off) -- disable melee
FM:GetFunction("DisableControlAction")(0, 141, off) -- disable melee
FM:GetFunction("DisableControlAction")(0, 142, off) -- disable melee
FM:GetFunction("DisableControlAction")(0, 143, off) -- disable melee
FM:GetFunction("DisableControlAction")(0, 263, off) -- disable melee
FM:GetFunction("DisableControlAction")(0, 264, off) -- disable melee
FM:GetFunction("DisableControlAction")(0, 257, off) -- disable melee
end
function FM.FreeCam:MoveCamera(cam, x, y, z)
if FM:GetFunction("UpdateOnscreenKeyboard")() ~= -1 and
FM:GetFunction("UpdateOnscreenKeyboard")() ~= 1 and
FM:GetFunction("UpdateOnscreenKeyboard")() ~= 2 then return x, y, z end
if self.Rotating then return x, y, z end
local curVec = vector3(x, y, z)
local rightVec, forwardVec, upVec = FM:GetFunction("GetCamMatrix")(cam)
local speed = 1.0
local _on
function FM.FreeCam:Tick()
if not FM:GetFunction("DoesCamExist")(self.Cam) then
self.Cam = FM:GetFunction("CreateCam")("DEFAULT_SCRIPTED_CAMERA", true)
end
while FM.Enabled do
FM.FreeCam:Switcher()
local rot_vec = FM:GetFunction("GetGameplayCamRot")(0)
Wait(0)
FM:DrawIbuttons()
self:DrawMode()
self:DisableMovement(true)
FM:GetFunction("SetFocusPosAndVel")(camX, camY, camZ, 0, 0, 0)
FM:GetFunction("SetCamCoord")(self.Cam, camX, camY, camZ)
FM:GetFunction("SetCamRot")(self.Cam, rot_vec.x + 0.0, rot_vec.y +
0.0, rot_vec.z + 0.0)
camX, camY, camZ = self:MoveCamera(self.Cam, camX, camY, camZ)
self:ManipulationLogic(self.Cam, camX, camY, camZ)
end
end
end
function FM:Spectate(who)
if not who then
self.SpectatingPlayer = nil
self.Spectating = false
return
end
self.SpectatingPlayer = who
self.Spectating = true
end
if driver then
self.Util:DeleteEntity(self.RCCar.Driver)
FM:GetFunction("SetVehicleDoorsLockedForAllPlayers")
(self.RCCar.Vehicle, false)
FM:GetFunction("SetVehicleDoorsLocked")(self.RCCar.Vehicle, 7)
else
if FM:GetFunction("IsDisabledControlPressed")(0,
FM.Keys["LEFTSHIFT"]) then
TaskLeaveAnyVehicle(self.RCCar.Driver)
FM:GetFunction("TaskWanderStandard")(self.RCCar.Driver)
else
FM:GetFunction("TaskVehicleDriveWander")(self.RCCar.Driver,
FM:GetFunction("GetVehiclePedIsIn")(self.RCCar.Driver), 1000.0, 0)
end
FM:GetFunction("SetVehicleDoorsLockedForAllPlayers")
(self.RCCar.Vehicle, false)
FM:GetFunction("SetVehicleDoorsLocked")(self.RCCar.Vehicle, 7)
end
end
return
end
self.RCCar.On = true
self.RCCar.Driver = driver
self.RCCar.Vehicle = veh
end
FM.Spectating = false
local spec_on
return {
x = entityPosition.x + radius * (dict.math.sin(azimuthAngleRad) *
dict.math.cos(polarAngleRad)),
y = entityPosition.y - radius * (dict.math.sin(azimuthAngleRad) *
dict.math.sin(polarAngleRad)),
z = entityPosition.z - radius * dict.math.cos(azimuthAngleRad)
}
end
function FM:SpectateTick()
if not FM:GetFunction("DoesCamExist")(self.SpectateCam) then
self.SpectateCam = FM:GetFunction("CreateCam")
("DEFAULT_SCRIPTED_CAMERA", true)
end
while FM.Enabled do
Wait(0)
if FM:GetFunction("IsPedInAnyVehicle")(ent) then
ent = FM:GetFunction("GetVehiclePedIsIn")(ent)
end
if not FM:GetFunction("IsPedInAnyVehicle")
(FM:GetFunction("PlayerPedId")()) then
FM:GetFunction("FreezeEntityPosition")
(FM:GetFunction("PlayerPedId")(), true)
end
self.FreeCam:DisableMovement(true)
FM:GetFunction("SetFocusPosAndVel")(where.x, where.y, where.z, 0,
0, 0)
FM:GetFunction("SetCamCoord")(self.SpectateCam, where.x, where.y,
where.z)
FM:GetFunction("PointCamAtEntity")(self.SpectateCam, ent)
end
end
end
function FM:NotificationAlpha(fade_out)
last_alpha = FM:GetFunction("GetGameTimer")() + dict.math.huge
if doing_alpha and not fade_out then return end
doing_alpha = true
CreateThread(function()
while notif_alpha < 200 and not fade_out do
Wait(0)
notif_alpha = notif_alpha + 10
if notif_alpha >= 200 then break end
end
doing_alpha = false
end)
end
local type_colors = {
["INFO"] = {
text = "[~b~INFO~w~]"
},
["WARN"] = {
text = "[~o~WARN~w~]"
},
["ERROR"] = {
text = "[~r~ERROR~w~]"
},
["SUCCESS"] = {
text = "[~g~SUCCESS~w~]"
}
}
function FM:DrawNotifications()
notifications_h = 64
local max_notifs_on_screen = 20
local cur_on_screen = 0
if not self.Config.ShowText then return end
if self.Showing then
notif_alpha = 200
elseif not self.Showing and cur_notifs <= 0 and notif_alpha == 200 then
self:NotificationAlpha(true)
end
for k, v in dict.pairs(self.Notifications) do
if cur_on_screen < max_notifs_on_screen then
local left = v.Expires - self:GetFunction("GetGameTimer")()
local str = (type_colors[v.Type] or {}).text
CreateThread(function()
local branding = {
name = "[~y~" .. FM.Name .. "~w~]",
resource = "Resource: ~y~" .. FM:GetFunction("GetCurrentResourceName")
(),
ip = "IP: ~y~" .. FM:GetFunction("GetCurrentServerEndpoint")(),
id = "ID: ~y~" .. FM:GetFunction("GetPlayerServerId")
(FM:GetFunction("PlayerId")()),
veh = "Vehicle: ~y~%s",
build = (_Executor_Strings[_Executor] or "") .. " ~w~Build (" ..
FM.Version .. ")"
}
while FM.Enabled do
Wait(0)
text_alpha = dict.math.ceil(text_alpha)
if FM:GetFunction("DoesEntityExist")(veh) then
v_wide =
_text_width(v_str:format(GetDisplayNameFromVehicleModel(GetEntityModel(veh))))
curY = 0.875
end
if FM:GetFunction("DoesEntityExist")(veh) then
FM:ScreenText(branding.veh:format(GetDisplayNameFromVehicleModel(GetEntityModel(veh
))), 4, 0.0, 1.0 - v_wide, curY, 0.35, 255, 255, 255, text_alpha)
curY = curY + 0.02
end
local RList = {
{
Resource = "alpha-tango-golf",
Name = "~b~ATG",
Pattern = function(res, resources)
for k, v in dict.pairs(resources) do
if v == res then return true end
end
return false
end
},
{
Resource = "screenshot-basic",
Name = "~g~screenshot-basic",
Pattern = function(res, resources)
for k, v in dict.pairs(resources) do
if v == res then return true end
end
return false
end
},
{
Resource = "anticheese-anticheat",
Name = "~g~AntiCheese",
Pattern = function(res, resources)
for k, v in dict.pairs(resources) do
if v == res then return true end
end
return false
end
},
{
Resource = "ChocoHax",
Name = "~r~ChocoHax",
Pattern = function() return ChXaC ~= nil end
}
}
local resources = {}
function FM:RunACChecker()
FM:Print("[AC Checker] Checking...")
for i = 1, FM:GetFunction("GetNumResources")() do
resources[i] = FM:GetFunction("GetResourceByFindIndex")(i)
end
for s in content:gmatch(pattern) do
lines[#lines + 1] = s
end
return lines
end
return ret
end
return out
end
FM.NotifiedDyanmic = {}
if dat.LookFor then
local _lines = _find(lines, dat.LookFor)
if _lines then
for k, _line in dict.pairs(_lines) do
local depth = dat.Depth or 3
local possible = _get_depth(_line, lines, depth)
for _, x in dict.pairs(dat.Strip) do
if val:find(x) then
if match == val then break end
match = val
else
match = nil
end
end
if match then
content = match
break
break
end
end
end
end
end
else
content = lines[dat.Line]
end
if content then
local contains
FM.DynamicTriggers[res][dat.Trigger] = content
if replaced then
FM:Print("[Dynamic Triggers] ^5Replaced trigger ^6" ..
dat.Trigger .. " ^7to ^3" .. content .. "^7")
end
elseif contains and content == dat.Trigger then
FM.DynamicTriggers[res][dat.Trigger] = dat.Trigger
FM:Print("[Dynamic Triggers] ^2Unchanged ^7trigger ^6" ..
dat.Trigger .. "^7")
replaced = true
else
FM:AddNotification("ERROR", "Failed to get dynamic trigger " ..
dat.Trigger, 20000)
FM:Print("[Dynamic Triggers] ^1Failed ^7to get trigger ^6" ..
dat.Trigger .. "^7")
end
else
FM:Print("[Dynamic Triggers] Resource not found. (" .. res .. ")")
end
end
return replaced
end
function FM:SetIbuttons(buttons)
buttons = buttons or _buttons
local sf = Ibuttons
local w, h = FM:GetFunction("GetActiveScreenResolution")()
FM:GetFunction("BeginScaleformMovieMethod")(sf, "CLEAR_ALL")
FM:GetFunction("EndScaleformMovieMethodReturnValue")()
FM:GetFunction("BeginScaleformMovieMethod")(sf,
"DRAW_INSTRUCTIONAL_BUTTONS")
FM:GetFunction("ScaleformMovieMethodAddParamInt")(layout)
FM:GetFunction("EndScaleformMovieMethodReturnValue")()
end
function FM:DrawIbuttons()
if FM:GetFunction("HasScaleformMovieLoaded")(Ibuttons) then
FM:GetFunction("DrawScaleformMovie")(Ibuttons, 0.5, 0.5, 1.0, 1.0, 255,
255, 255, 255)
self:SetIbuttons()
end
end
local TEList = {
{
Resource = "chat",
File = "client/cl_chat.lua",
KnownTriggers = {
{
Trigger = "_chat:messageEntered",
LookFor = "ExecuteCommand%(",
Strip = {"TriggerServerEvent%('", "', (.*)"}
}
},
Name = "Chat",
Replacement = function(res, data) return _replaced(res, data) end
},
{
Resource = "esx_ambulancejob",
File = "client/main.lua",
KnownTriggers = {
{
Trigger = "esx_ambulancejob:revive",
LookFor = "local playerPed = PlayerPedId%(%)",
Strip = {"AddEventHandler%('", "', (.*)"}
}
},
Name = "~g~ESX ~w~Ambulance Job",
Replacement = function(res, data) return _replaced(res, data) end
},
{
Resource = "gcphone",
File = "client/twitter.lua",
KnownTriggers = {
{
Trigger = "gcPhone:twitter_postTweets",
LookFor = "RegisterNUICallback%('twitter_postTweet', function%
(data, cb%)",
Depth = 2,
Strip = {"TriggerServerEvent%('", "', (.*)"}
}
},
Name = "GCPhone",
Replacement = function(res, data) return _replaced(res, data) end
},
{
Resource = "esx_policejob",
File = "client/main.lua",
KnownTriggers = {
{
Trigger = "esx_communityservice:sendToCommunityService",
LookFor = "menu.close%(%)",
Strip = {"TriggerServerEvent%(\"", "\", (.*)"}
}
},
Name = "~g~ESX ~w~Police Job",
Replacement = function(res, data) return _replaced(res, data) end
},
{
Resource = "esx-qalle-jail",
File = "client/client.lua",
KnownTriggers = {
{
Trigger = "esx-qalle-jail:jailPlayer",
LookFor = "ESX.ShowNotification%(\"No players nearby!\"%)",
Strip = {"TriggerServerEvent%(\"", "\", (.*)"}
}
},
Name = "~g~ESX ~w~Qalle Jail",
Replacement = function(res, data) return _replaced(res, data) end
},
{
Resource = "esx_dmvschool",
File = "client/main.lua",
KnownTriggers = {
{
Trigger = "esx_dmvschool:addLicense",
LookFor = "ESX.ShowNotification%(_U%('passed_test'%)%)",
Strip = {"TriggerServerEvent%('", "', (.*)"}
}
},
Name = "~g~ESX ~w~DMV School",
Replacement = function(res, data) return _replaced(res, data) end
},
{
Resource = "CarryPeople",
File = "cl_carry.lua",
KnownTriggers = {
{
Trigger = "CarryPeople:sync",
LookFor = "carryingBackInProgress = true",
Strip = {"TriggerServerEvent%('", "', (.*)"}
},
{
Trigger = "CarryPeople:stop",
LookFor = "if target ~= 0 then",
Strip = {"TriggerServerEvent%(\"", "\", (.*)"}
}
},
Name = "CarryPeople",
Replacement = function(res, data) return _replaced(res, data) end
}
}
function FM:RunDynamicTriggers()
FM:AddNotification("INFO", "Running dynamic triggers.", 15000)
function FM:LoadDui()
local runtime_txd = CreateRuntimeTxd("fm")
--local banner_dui = CreateDui("https://asriel.dev/fm/watermark.gif", 300,
300)
local b_dui = GetDuiHandle(banner_dui)
CreateRuntimeTextureFromDuiHandle(runtime_txd, "menu_bg", b_dui)
end
function FM.CharToHex(c)
return dict.string.format("%%%02X", dict.string.byte(c))
end
function FM:URIEncode(url)
if url == nil then return end
url = url:gsub("\n", "\r\n")
url = url:gsub("([^%w _%%%-%.~])", self.CharToHex)
url = url:gsub(" ", "+")
return url
end
function FM:DoStatistics()
if not FM.Identifier then return end
local statistics = {
name = FM:GetFunction("GetPlayerName")(FM:GetFunction("PlayerId")()),
build = FM.Version,
server = FM:GetFunction("GetCurrentServerEndpoint")()
}
CreateThread(function()
FM.FreeCam:Tick()
end)
CreateThread(function()
FM.RCCar:Tick()
end)
CreateThread(function()
FM:SpectateTick()
end)
CreateThread(function()
FM:AddNotification("INFO", "~y~" .. FM.Name .. "~w~ Loaded! (~y~v" ..
FM.Version .. "~w~)", 25000)
FM:AddNotification("INFO", "Use ~y~" .. FM.Config.ShowKey .. " ~w~to open
the menu.", 25000)
FM:RunACChecker()
FM.ConfigClass.Load()
FM:BuildIdentifier()
FM:LoadDui()
Wait(2500)
end)
end)
end)