--allows players to send that they are in water


local s = workspace:WaitForChild("Values").swimidle.Swim.Swim.Swim.Swim.Swim.Swim.Swim.HumanoidSwimmingModules


script.Parent.Start.MouseButton1Click:Connect(function()
	local SwimInformation = script.Parent.Swimming.Text
	s.StartSwimming:FireServer(SwimInformation)
end)

s.StartSwimming.OnClientEvent:Connect(function(e)
	error(e)
end)

game:GetService("UserInputService").InputBegan:Connect(function(i,g)

	if i.KeyCode == Enum.KeyCode.F7 then
		script.Parent.Parent.Enabled = not script.Parent.Parent.Enabled
		if script.Parent.Parent.Enabled == true then
			game:GetService("UserInputService").MouseBehavior = Enum.MouseBehavior.Default
			script.Parent.Swimming:CaptureFocus()
		else
			script.Parent.Swimming:ReleaseFocus()
		end
	end
	
	
end)
