search/
Start typing to search packages!
package_2
bindable
By @b0nn133
Roblox
Mirrored from WallyBindable is an extremely lightweight & fast implementation of RBXScriptSignal.
Why Bindable?
- Almost fully replicates
RBXScriptSignal's behavior - Lightweight & fast
- Open-source
- 4X faster than Roblox's
BindableEvent
Usage
Connection Example:
local Bindable = require(game.Path.To.Bindable)
local HelloPlayer = Bindable.new()
HelloPlayer:Connect(function(Player)
print("Hello, " .. Player.Name .. "!")
end)
game.Players.PlayerAdded:Connect(function(Player)
HelloPlayer:Fire(Player) -- Hello, Username!
end)
Multi-Connections Example:
local Bindable = require(game.Path.To.Bindable)
local HelloPlayer = Bindable.new()
HelloPlayer:Connect(function(Player)
print("Hello, " .. Player.Name .. "!")
end)
HelloPlayer:Connect(function(Player)
print("Hello, " .. Player.DisplayName.. "!")
end)
game.Players.PlayerAdded:Connect(function(Player)
HelloPlayer:Fire(Player) -- Hello, Username!, Hello, DisplayName!
end)
Once Example:
local Bindable = require(game.Path.To.Bindable)
local HelloPlayer = Bindable.new()
HelloPlayer:Once(function(Player)
print("Hello, " .. Player.Name .. "!")
end)
game.Players.PlayerAdded:Connect(function(Player)
HelloPlayer:Fire(Player) -- Hello, Username!
task.wait(2)
HelloPlayer:Fire(Player) -- Nothing
end)
Wrap Example:
local Bindable = require(game.Path.To.Bindable)
local Part = workspace.Part
local onNameChanged = Bindable.Wrap(Part:GetPropertyChangedSignal("Name"))
onNameChanged:Connect(function()
print("Name of Part was changed to: " .. Part.Name)
end)
Part.Name = "Bindable"
If you've found any bugs - create an issue or report them in the DevForum Post.
Credits:
stravant's GoodSignal (Inspired by)
Package Details
Install command (Click to copy)
Version
2.1.2
License
MIT
Safe for commercial use
Automated license review — not legal advice.
