How could I convert this into a server side script?
local userInputService = game:GetService("UserInputService")
local seat = script.Parent.Seat.Value
local UpdateTrain = seat.UpdateTrain
local Functions = seat.Parent.Functions
horn = true
bell = false
ditchlights = false
userInputService.InputBegan:Connect(function(input, gameProcessed)
if input.KeyCode == Enum.KeyCode.D then
if ditchlights == false then
print("Ditchlights On")
Functions.Ditchlights.Value = true
ditchlights = true
else
print("Ditchlights Off")
Functions.Ditchlights.Value = false
ditchlights = false
end
end
if input.KeyCode == Enum.KeyCode.B then
if bell == false then
print("Bell On")
bell = true
else
print("Bell Off")
bell = false
end
end
end)