end and end)

(These 2 are used to end a script, that's why they're called ends.)

End) is used to end a script with a function, here's an example

(This is a server script in a ClickDetector.)

script.Parent.MouseClick:Connect(function()

        ~ Your script here. ~
end)

The end has a bracket included with it. You may ask, "Why is that?". It's because when you write 'function' in the brackets, you'll have to add another pair of brackets in those brackets after the word 'function' and whatever is written in that pair of brackets you added will be the function. This still doesn't answer the question, I did this to make it more understandable. The reason is that at the end of the brackets you'll see there's a double bracket, so click in between those 2 brackets and press enter on your keyboard. You'll see that an end with a bracket was added. Don't worry, ends are written automatically.