Indent properly so that you can tell code blocks apart and find out where ends may be missing.
When you use anonymous functions to declare event listeners, those need to be closed.
local scoped = false
local cam
script.Parent.Equipped:connect(function(mouse)
cam = game.Workspace.CurrentCamera
mouse.KeyDown:Connect(function(key) -- 'connect' is deprecated, use 'Connect'
key = key:lower()
if key == "q" then
cam.FieldOfView = scoped and 70 or 50
scoped = not scoped
script.Parent.MaxSpread.Value = 0.025
script.Parent.ADSModel.ADSBarrelA.Transparency = 0
script.Parent.ADSModel.FakeADSM.Transparency = 0
script.Parent.ADSModel.ADSBackSights.Transparency = 0
script.Parent.ADSModel.ADSGun.Transparency = 0
script.Parent.ADSModel.ADSSight1.Transparency = 0
script.Parent.ADSModel.ADSSight2.Transparency = 0
script.Parent.ADSModel.BulletA1.Transparency = 0
script.Parent.ADSModel.BulletA2.Transparency = 0
script.Parent.ADSModel.BulletA3.Transparency = 0
script.Parent.ADSModel.BulletA4.Transparency = 0
script.Parent.ADSModel.BulletA5.Transparency = 0
script.Parent.ADSModel.BulletA6.Transparency = 0
script.Parent.ADSModel.BulletA7.Transparency = 0
script.Parent.ADSModel.BulletA8.Transparency = 0
end
end) -- added
script.Parent.Unequipped:Connect(function() -- again here
cam.FieldOfView = 70
script.Parent.MaxSpread.Value = 0.1
end) --added
end) -- added closing parentheses
Also, it’s generally a bad idea to connect to events inside other event listeners.
You either need to disconnect the events when you’re done with them (e.g. inside Unequipped), or disable their processing with some flag variable (e.g. make every connection fully separate, and use global vars to control when the functions should execute.)
What he means is that every time the tool is equipped it will create NEW events that are unnecessary since there are ones that already exist after the first equip.