local Gui = script.Parent
local Player = Gui.Parent.Parent.Parent
local Char = Player.Character
local Cam = game.Workspace.CurrentCamera
function button()
reset()
end
Gui.MouseButton1Click:connect(button)
function reset()
Char.Parent = game.Workspace
local c = Char:GetChildren()
Char.Humanoid.Health = 0
end
i already have the button and everything this script works but how does it work and is there a more smiple way to mka e script that kills someone

2 comments
Is it possible to write out the this without variables
It is but it will take you time to do so. Variables are commonly used to make the script shorter.