Skip to content

Instantly share code, notes, and snippets.

View ImXirvin's full-sized avatar
🥚
why read documentation when you can debug

Xirvin ImXirvin

🥚
why read documentation when you can debug
View GitHub Profile
@ImXirvin
ImXirvin / doorlock.lua
Created August 5, 2024 00:14
QB Doorlock ps housing edit
local function saveNewDoor(src, data, doubleDoor)
local Player = QBCore.Functions.GetPlayer(src)
if not Player then return end
local configData = {}
local jobs, gangs, cids, items, doorType, identifier
if data.job then configData.authorizedJobs = { [data.job] = 0 } jobs = "['"..data.job.."'] = 0" end
if data.gang then configData.authorizedGangs = { [data.gang] = 0 } gangs = "['"..data.gang.."'] = 0" end
if data.cid then configData.authorizedCitizenIDs = { [data.cid] = true } cids = "['"..data.cid.."'] = true" end
if data.item then configData.items = { [data.item] = 1 } items = "['"..data.item.."'] = 1" end
@ImXirvin
ImXirvin / MovemenController.lua
Created May 15, 2024 00:41
Movement Controller for Roblox
local RunService = game:GetService("RunService")
local ContextActionService = game:GetService("ContextActionService")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Controllers = ReplicatedStorage:WaitForChild("Controllers")
local HUDController = require(Controllers.Character.HUDController)
-- Constants
local HEAD_HORIZONTAL_FACTOR = 1
local HEAD_VERTICAL_FACTOR = 0.6
local BODY_HORIZONTAL_FACTOR = 0.5
@ImXirvin
ImXirvin / checker.lua
Created December 28, 2022 10:56
CFX Standalone Version Checker
CreateThread(function()
--version check with github latest version
PerformHttpRequest(
"https://raw.githubusercontent.com/[User]/[Repo]/main/fxmanifest.lua",
function(err, text, headers)
if err ~= 200 then
return
end
local version = GetResourceMetadata(GetCurrentResourceName(), "version")
local latestVersion = string.match(text, '%sversion \"(.-)\"')