alarm-system/Demo Stuff/DemoScript.lua
Christopher Cookman a0224bcae4
Small thing
- Create demo script for showcases/videos/expos/whatever. Just loops through all the states.
2024-08-15 19:14:54 -06:00

35 lines
763 B
Lua

-- Place under boot() in SecuritySystem
local demoLoop = function()
while wait() do
wait(5)
toggleChime()
wait(5)
toggleChime()
wait(5)
armStay()
wait(script.Parent.Settings.exitDelay.Value + 5)
disarm()
wait(5)
armAway()
wait(script.Parent.Settings.exitDelay.Value + 5)
disarm()
wait(5)
armInstant()
wait(script.Parent.Settings.exitDelay.Value + 5)
disarm()
wait(5)
armMax()
wait(script.Parent.Settings.exitDelay.Value + 5)
disarm()
wait(5)
armAway()
wait(script.Parent.Settings.exitDelay.Value + 5)
script.Parent.Zones["1"].Sensors.Demo.Alarm.Value = true
wait(1)
script.Parent.Zones["1"].Sensors.Demo.Alarm.Value = false
repeat wait() until armState == 3
wait(5)
disarm()
end
end
task.spawn(demoLoop)