Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local funcs = {}
- function funcs.lasersOn()
- local laserFolder = workspace:WaitForChild("LaserLights")
- local colors = {
- 191, 53, 236,
- 236, 202, 78,
- 23, 90, 236,
- 31, 122, 57,
- 122, 90, 37
- }
- for Index, Light in ipairs(laserFolder:GetChildren()) do
- local panMot = Light:FindFirstChild("LightingController").PanMotor
- local tiltMot = Light:FindFirstChild("LightingController").TiltMotor
- if panMot and tiltMot then
- local randomAngle1 = math.random(0 , 1)
- local randomAngle2 = math.random(-1 , 0)
- panMot.DesiredAngle = randomAngle1
- tiltMot.DesiredAngle = randomAngle2
- local lightBeam = Light:FindFirstChild("Body").Head.Beam1
- if lightBeam then
- local randomColor = Color3.new(math.random(0, #colors))
- lightBeam.Transparency = 0
- lightBeam.Color = randomColor
- end
- end
- end
- end
- return funcs
Advertisement
Add Comment
Please, Sign In to add comment