--End of Settup

print("Setup Done!")
end

function onSelected(mouse)-- if u Selected the tool it comes alife O: [NOT TO CHANGE!]
	mouse.Icon = "rbxasset://textures\\GunCursor.png"-- Icon of mouse
	mouse.Button1Down:connect(function() onFollow(mouse) end)
	mouse.Move:connect(function() onButton1Down(mouse) end)
	mouse.Button1Up:connect(function() onButton1Up(mouse) end)
	mouse.KeyDown:connect(function(key) onKeyDown(key,mouse) end)
	mouse.KeyUp:connect(KU)
	if(script.Parent.Parent.Parent.Character ~= nil) then
		if(script.Parent.Parent.Parent.Character:findFirstChild("Plane") ~= nil) then
		daplain =script.Parent.Parent.Parent.Character:findFirstChild("Plane")
		end
		end
	vParts = daplain.Parts
	wait()
	local Gui = script.PlaneStats:Clone()
	Gui.Parent = script.Parent.Parent.Parent.PlayerGui
	setup(vParts)
	wait(1)
	interface(Gui)
	 dagui = Gui 

end
function onDeselected()-- this removes the GUI after DISSELECTING [NOT TO CHANGE!]
if Gui ~= nil then
Gui:remove()
Gui = nil
end
end


 

function interface(G)-- GUI InterFace U may change things below XD
while true do
wait(0.1)
if G ~= nil then
PS = G.Frame-- the Gui