script.SwitchON.Changed:Connect(function()task.wait()if script.SwitchON.Value==true then if Configuration.IsAPushButton.Value==false then ProximityPrompt.ActionText=Configuration.PromptSettings.ActionText2.Value ProximityPrompt.ObjectText=Configuration.PromptSettings.ObjectText2.Value script.Parent.ToggleSwitchSound:Play()end script.KeepActive.Enabled=true else if Configuration.IsAPushButton.Value==false then ProximityPrompt.ActionText=Configuration.PromptSettings.ActionText1.Value ProximityPrompt.ObjectText=Configuration.PromptSettings.ObjectText1.Value script.Parent.ToggleSwitchSound:Play()end script.KeepActive.Enabled=false Configuration.ControlledValue.Value.Value=false end end)

script.SwitchON.Changed:Connect(function()
	task.wait()
	if script.SwitchON.Value == true then
		if Configuration.IsAPushButton.Value == false then
			ProximityPrompt.ActionText = Configuration.PromptSettings.ActionText2.Value
			ProximityPrompt.ObjectText = Configuration.PromptSettings.ObjectText2.Value
			script.Parent.ToggleSwitchSound:Play()
		end
		script.KeepActive.Enabled = true
	else
		if Configuration.IsAPushButton.Value == false then
			ProximityPrompt.ActionText = Configuration.PromptSettings.ActionText1.Value
			ProximityPrompt.ObjectText = Configuration.PromptSettings.ObjectText1.Value
			script.Parent.ToggleSwitchSound:Play()
		end
		script.KeepActive.Enabled = false
		Configuration.ControlledValue.Value.Value = false
	end
end)
