alarm-system/Demo Stuff/DemoScript.lua
Christopher Cookman 684767fe86
v1.2.4
- Add setting to enable/disable exit delay countdown!
2024-08-16 21:56:51 -06:00

42 lines
959 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()
wait(5)
script.Parent.Zones["2"].Sensors.Demo.Alarm.Value = true
wait(1)
script.Parent.Zones["2"].Sensors.Demo.Alarm.Value = false
repeat wait() until armState == 4
wait(5)
disarm()
end
end
task.spawn(demoLoop)