Copy salient and essential scripts and models from Plane Building Roblox
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
local module = {}
|
||||
|
||||
function module.new(this,boombox,context)
|
||||
this.sound = _G.GetInstance(_G.GetInstance(boombox,"Plank"),"Sound")
|
||||
end
|
||||
|
||||
module.messages = {
|
||||
source = function(this,speaker,context,value)
|
||||
this.sound.SoundId = "rbxassetid://"..(tostring(value or "") or "")
|
||||
end,
|
||||
default = function(this,speaker,context,value)
|
||||
if value > 0.5 then
|
||||
this.sound:Play()
|
||||
elseif value == 0 then
|
||||
this.sound:Pause()
|
||||
elseif value < -0.5 then
|
||||
this.sound:Stop()
|
||||
end
|
||||
end,
|
||||
}
|
||||
|
||||
module.manifest = {
|
||||
"Boombox"
|
||||
}
|
||||
|
||||
return module
|
||||
Reference in New Issue
Block a user