Skip to main content
Bloxstrike only. The bomb (planted, defusing, exploded, plant in progress), the hostages on the map, the gamemode, and items dropped on the ground. Every getter returns the current value the moment you call it.

Bomb

CallReturnsWhat it tells you
getBomb()BombState?The currently planted bomb, or nil if no bomb is in play.
getBombTime()number?Seconds until the bomb detonates (clamped to 0 if past). nil when there’s no bomb.
isBombPlanted()booleantrue while a bomb is in play.
isBombDefusing()booleantrue while someone is actively defusing.
isBombDefused()booleantrue once the bomb has been defused this round.
isBombExploded()booleantrue once the bomb has detonated this round.
getPlanting()PlantingState?Info about an in-progress plant (yours or someone else’s). nil when nobody’s planting.
See BombState and PlantingState.

Bomb signals

SignalWhen your callback runs
onBombPlanted(bomb): a bomb just appeared
onBombDefused(bomb): the bomb was just defused
onBombExploded(bomb): the bomb just detonated
onBombCleared(): the bomb is gone (round ended, cleanup, etc.)
onPlantingStarted(planting): someone started planting
onPlantingEnded(planting): someone stopped planting (cancelled or finished)

Hostages

CallReturnsWhat it tells you
getHostages(){ [string]: HostageState }Every hostage model currently tagged in the world. Keys are internal ids (the model’s string id).
getHostage(key)HostageState?One entry from getHostages(), or nil if that hostage left.
getRescueRemaining(hostage)number?Seconds left on an in-progress rescue. nil when nobody is rescuing it.
getRescueProgress(hostage)numberRescue progress from 0 to 1. 0 when nobody is rescuing.
Pass the table from getHostages(), getHostage(), or a signal callback into the rescue helpers. See HostageState.

Hostage signals

SignalWhen your callback runs
onHostageAdded(key, hostage): a hostage model was tagged and tracked
onHostageRemoved(key, hostage): a hostage left the world
onHostageChanged(key, hostage): state updated (idle, carrying, rescue started, etc.)

Gamemode

CallReturnsWhat it tells you
getGamemode()string?The current gamemode, e.g. "Bomb Defusal", "Hostage Rescue", "Deathmatch".
getServerGamemode()string?The server’s matchmaking mode, e.g. "Competitive".
isBombDefusal() / isHostageRescue() / isDeathmatch()booleanShortcuts for checking the gamemode.
isCompetitive()booleantrue on competitive servers.

Gamemode signals

SignalWhen your callback runs
onGamemodeChanged(gamemode): the gamemode changed
onServerGamemodeChanged(serverGamemode): the server’s matchmaking mode changed

Dropped items

CallReturnsWhat it tells you
getDroppedItems(){ DroppedItem }Every weapon, grenade, and bomb lying on the ground right now. Empty in Deathmatch.
getDroppedItem(model)DroppedItem?One dropped item by its model, or nil.
See DroppedItem.

Dropped item signals

SignalWhen your callback runs
onDroppedItemAdded(item): something was dropped on the ground
onDroppedItemRemoved(item): a dropped item was picked up or despawned

Examples

api.game.onBombPlanted:Connect(function(bomb)
    print("bomb planted, explodes in", bomb.duration, "seconds")
end)

api.utility.connect(game:GetService("RunService").Heartbeat, function()
    local t = api.game.getBombTime()
    if t and t < 10 then
        -- flash a "DEFUSE NOW" overlay or similar
    end
end)

api.game.onHostageChanged:Connect(function(key, hostage)
    if hostage.rescuingPlayer then
        local left = api.game.getRescueRemaining(hostage)
        print(hostage.rescuingPlayer, "rescuing", key, left, "s left")
    end
end)