📵 Screen Damage
Break screen
Example of a broken phone - Preview
lua-- phoneImei - string, The target phone's IMEI. -- level - number(optional), The level of damage. *default(1-9) -- breackTouchscreen - boolean(optional), Whether the phone screen should work. -- The function will randomize the values if the optional properties aren't passed. exports.yseries:BreakScreen(phoneImei, level, breakTouchscreen)
Fix screen
lua-- phoneImei - string, The target phone's IMEI. exports.yseries:FixScreen(phoneImei)
Get screen damage
Retrieves the current screen damage status for a phone.
lua---@param phoneImei string The phone IMEI to get screen damage for ---@return table|nil Returns table with screen damage level and touchscreen status, or nil if no damage or invalid IMEI local damage = exports.yseries:GetScreenDamage(phoneImei) if damage then print("Screen damage level: " .. damage.level) print("Touchscreen broken: " .. tostring(damage.breakTouchscreen)) else print("No screen damage or invalid IMEI") end
Returns:
nil- If the IMEI is invalid, or if no screen damage existstable- If screen damage exists, containing:level(number) - The screen damage level (1-9 based on config)breakTouchscreen(boolean) - Whether the touchscreen is broken
Example:
lualocal phoneImei = "1234567890" local damage = exports.yseries:GetScreenDamage(phoneImei) if damage then if damage.breakTouchscreen then print("Phone screen is broken and touchscreen is not working") else print("Phone screen is damaged (level " .. damage.level .. ") but touchscreen works") end else print("Phone has no screen damage") end